Announcing NativeScript Angular v.4

By
Alexander Vakrilov

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 nativescript-angular@3.0.0 together with tns-core-modules@3.0.0).

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.

Animations! 

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.

Animation staggering  

Space animations on multiple elements with stagger()
android-stagger ios-stagger


Here is the repo with the code: ns-ng-animation-examples 

Routable Animations 

Define navigation transitions inside <router-outlet> with the new routeAnimations API:
android-routing
ios-routing

Here is the repo with the code: ns-ng-routable-animations 

Fair Warning

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.

Share this article

Comments


Comments are disabled in preview mode.

Stay connected with NativeScript

NativeScript
NativeScript is licensed under the Apache 2.0 license .
© 2017 Progress Software Corporation. All Rights Reserved.