Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

42.
no
function
Goal
ngula
‘t]'lit-, ‘ to the Ar
facilitation
Migrating from 1.4 to 1.5
Angular 1.5 takes a big step towards preparing developers for a smoother transition to Angular 2 in the future. Architecturing your
applications using components, multi-slot transclusion, one-way bindings in isolate scopes, using lifecycle hooks in directive controllers
and relying on native ES6 features (such as classes and arrow functions) are now all possible with Angular 1.5.
This release includes numerous bug and security fixes, as well as performance improvements to core services, directives, filters and helper
functions. Existing applications can start enjoying the benefits of such changes in $compile , $pa rse , sanimate , sanimatecss ,
ssanitize , ngoptions , currencyFilter , numberFilter , copy() (to name but a few) without any change in code.
New features have been added to more than a dozen services, directives and filters across 8 modules. Among them, a few stand out:
angular. componentl ) : Introducing "components", a special sort of directive that are easy to configure and promote best practices
(plus can bring Angular 1 applications closer to Angular 2's style of architecture).
Multi-slot transclusion: Enabling the design of more powerful and complex Ul elements with a much simpler configuration and
reduced boilerplate.
$onInit lifecycle hook: Introducing a new lifecycle hook for directive controllers, called after all required controllers have been
constructed. This enables access to required controllers from a directives controller, without having to rely on the linking function.
ngAn imateswap : A new directive in ngAnimate , making it super easy to create rotating banner—Iike components.
Testing helpers: New helper functions in ngM0ck , simplifying testing for animations, component controllers and routing.
Also, notable is the improved support for ES6 features, such as classes and arrow functions. These features are now more reliably
detected and correctly handled within the core.
All this goodness doesn't come without a price, though. Below is a list of breaking changes (grouped by module) that need to be taken into
account while migrating from 1.4. Fortunately, the majority of them should have a pretty low impact on most applications.
https: //docs. angularis. org/ guide/ migration