I'm delighted to announce a major release of the nativescript-angular plugin today. It includes the long-awaited support for Angular 4.2 and the goodies that the Angular team included in that release.
Why the Major Version?
Up until now, the versions of the nativescript-angular plugin were aligned with the current (minor) version of NativeScript. For example, we released firstname.lastname@example.org together with email@example.com).
However, Angular has a pretty aggressive release
schedule (with 5.0 coming this September), so we decided it will be a good move to align the versions of nativescript-angular with the versions of the Angular framework. This will also allow us to be semver compatible, as any breaking changes introduced with the major versions of Angular will surely affect NativeScript apps using the Angular integration too.
This is why we made the jump from 3.1.3 to 4.2.0.
Be sure to check out the changelog
when updating. As part of the major version we introduced NativeScriptCommonModule
(similar the stock CommonModule in Angular). This will require a minor change in the NgModule definitions in your apps.
Enough with the boring stuff! By far the most interesting feature in angular 4.2.0 are the new animation APIs. Element querying, reusable animations, animations parameters, stagger, routable animations—you name it. You can read all about New Wave of Animations Features
, but I want to show you my favourite two.
Space animations on multiple elements with stagger()
Here is the repo with the code: ns-ng-animation-examples
Define navigation transitions inside <router-outlet> with the new routeAnimations API:
Here is the repo with the code: ns-ng-routable-animations
Keep in mind that most of the animation APIs are still experimental
inside the angular framework. They are experimental also in the nativescript-angular integration, as most of the animation-integration code was completely re-written to be compatible with the 4.2.0 release.
That's it! Happy coding and animate yourself with the new release.