Wednesday, May 27, 2015

Angular 1.4.0 - jaracimrman-existence

Angular 1.4.0 has arrived! This is a truly community driven release.


This release brings many feature enhancements and performance improvements, while at the same time introducing as few breaking changes as possible. For apps following best practices, we expect the migration from Angular 1.3 to 1.4 to be smooth and the list of breaking changes is documented in the migration doc.


We started work on 1.4 in November last year. The features and issues we concentrated on were guided by an analysis of feedback from developers using the framework in real projects. The planning was done in public, see the planning spreadsheet and video of the planning meeting. The weekly meeting minutes are available online.

New Features

In over 400 commits, we have continually improved the docs, fixed more than 100 bugs, and added over 30 features. Here is a rundown of the new things you can benefit from in this release.

Animation

Matias completely refactored animations, giving it more powerful features and squashing tons of edge-case bugs at the same time. This code overhaul is backwards compatible, except for a small number of documented api changes. This refactoring makes it possible to imperatively control CSS-based transitions/keyframes via a new service called $animateCss. We can now also animate elements across pages via animation anchoring.
  • Complete refactor of internal animation code (c8700f04)
  • CSS-driven Javascript animations (see docs)
  • Better support for animation callback events (see docs)
  • Move elements between views with animation anchoring (see docs)
  • Provide support for animations on elements outside of $rootElement via $animate.pin() (e41faaa2)

$http

Pawel did some great work fixing outstanding issues in the $http service and also implemented a mechanism for providing custom URL parameter serialization, so now it is easy to connect to end-points that expect parameters to follow the jQuery-style parameter serialization.

Internationalization

Chirayu worked hard on improving i18n support for Angular apps. The first piece of this work was to provide a new ngMessageFormat module that supports the ICU MessageFormat interpolation syntax.

  • extend interpolation with MessageFormat like syntax (1e58488a, #11152)
  • Add FIRSTDAYOFWEEK and WEEKENDRANGE properties in the ngLocale data (3d149c7f)

Compiler related

To complement our push towards more use of `controller as` syntax in our component directives, Caitlin added support for binding a directive's element attributes straight onto the directive's controller.
  • allow using bindToController as object, support both new/isolate scopes (35498d70, #10420, #10467)

Cookies

Shahar had stepped up to implement the much needed overhaul of the ngCookies module. The $cookieStore has been deprecated and its functionality moved over to the $cookies service, which now has a much cleaner interface. He also implemented the frequently requested feature to set cookie options for individual cookies as well as configuring the defaults via $cookiesProvider.

Form Related

Matias was at it again, this time adding dynamic message support to the ngMessages directive, which makes it much easier to display messages requested at runtime from the server.


ngOptions was completely refactored to allow a number of annoying bugs to be fixed, it also now supports disabling an option using the `disabled when` syntax, thanks to Stephen Barker.

Shahar added improved support for specifying the timezone on date/time input elements that are using ngModel.
  • ngModel: support conversion to timezone other than UTC (0413bee8, #11005)

jQuery related

Michel Boudreau worked with Michał to allow us to specify exactly which version of jQuery (if any) we want Angular to use. This option also allows developers to instruct Angular to always use jqLite even if jQuery is present on the page, which can significantly improve performance for applications that are doing a lot of DOM manipulation via Angular's templating engine.
  • ng-jq: adds the ability to force jqLite or a specific jQuery version (09ee82d8)

Accessibility

Marcy Sutton continued to improve the accessibility of apps built with Angular with new features in the ngAria module:

Filters

We tweaked and improved a number of the filters. Shahar did some nice work to bring better timezone support to the date/time filters; Tamer Aydın helped to add a start index to the limitTo filter; Georgios completely rebuilt the filter filter to be able to compare with deep objects; and Quentin improved the support for infinity in the number filter.

Testing

Miscellaneous

Other features and improvements that are part of this release include:
  • angular.merge:
  • angular.Module:
  • $anchorScroll:
  • ngClass:
    • add support for conditional map within an array (4588e627, #4807)
  • $timeout:
  • $interval: pass additional arguments to the callback (4f1f9cfd, #10632)
  • $resource:
  • Scope:
  • CommonJS:
    • The new optional CommonJS support makes using Angular modules in environments like npm and browserify easier.

Performance Improvements

Lucas proposed and implemented a complete rewrite of the Angular expression parser. The new parser is easier to maintain and up to 25% faster. On top of that change we have also speeded up scope watching, the compiler and ngOptions.
  • $parse:
    • new and more performant parser (0d42426)
  • $compile:
    • replace forEach(controller) with plain loops (5b522867, #11084)
    • avoid .data when fetching required controllers (fa0aa839)
  • ngOptions:
    • only perform deep equality check on ngModel if using track by (171b9f7f, #11448, #11447)
    • only watch labels if a display expression is specified (51faaffd)

What's next?

There were two features that were pulled out of the 1.4 release. The component helper (#10007) and the component oriented hierarchical router. The main reason for this decision was that both of these deliverables were not ready for the important task of simplifying the migration path from Angular 1 to Angular 2. Rather than delay the 1.4 release further, we decided to move these two deliverables into the 1.5 release.


The 1.5 planning is already underway, with the Component Router and component helper among the initial seeds. As before, the planning meeting will be published online. In this meeting the areas of focus and prioritization will be picked. At ng-conf we announced that the future focus of the 1.x releases will be migration path to Angular 2, so you can expect many of the deliverables to be in this area.

Thanks

This Angular version is the first to be run by a much broader community oriented team, including many people from outside of the Google Angular team such as Lucas, Martin, Shahar, Pawel, Michał, Georgios and Jason. These are people who are using Angular on a day-to-day basis in real, often large applications. They have worked tirelessly week after week to help get this release out. On top of these core team members, a number of other people from the community have contributed significant code to this release, or helped to review issues and pull requests. We'd like to thank them all.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.