Angular 4.2 is here with new tweaks!

  • Cubettech
  • Angular
  • 7 years ago
Angular 4.2 is here with new tweaks!

Angular 4.2 is here with new tweaks!

Back when Angular 4 was released, it became an instant hit and the talk of the town within no time. It was the perfect solution for building large applications and became fastest version among all of the Angular releases. The angular community has always come up with some periodic releases with angular patches in every week, a minor release after a major release and a major release every 6 months.  And hence, a minor update to Angular has now been announced.

The 4.2 release has no ground breaking changes and is intended to be a drop-in replacement for the 4.x.x. The features which this version brings include the ability to bootstrap a component, validators in Angular Forms, a new compiler flag and improved i18n tooling. The animation features have also been updated with newer and advanced capabilities.

Moreover, the team has also announced a new website – The team would carry out up gradation of the website for providing an enhanced user experience, provide documentation, accept public contributions easier, and offer best practices to build Angular apps.

Angular 4.2 brings a wave of newer animation features which allows reusable and multi-element animations as well as full-scale router-level animations.

This animation feature was initially set to be released in 4.1, but, this was moved to 4.2 release for allowing API space to mature till the ultimate release of 4.2.

It’s has been a jerky road for the angular’s animations DSL. Optimistically the newer API features would offer the power in animating the Angular apps in ways that were never thought off till now.


With its fresh and innovative entry, the 4.2 release has fetched in much anticipated new surge of animation that enables reusable animations, complete multi-element and router level animations.

The new query function as brought together in this new version enables query feature in the template. Together with this, the new release also ropes in pseudo-selectors that line up some other futuristic possibilities. A number of new features are included for making the animations powerful and easier.

The new animation features allow us to:

  • Configure and organize options and set the input variables within the animations
  • Query for inner elements within animations using query()
  • Defining reusable animations with the help of animation()
  • Enabling queried elements for triggering their own animations
  • Programmatically control/ build an animation with the help of AnimationBuilder


The use of ‘strictNullChecks’ in all the applications has been made possible with the release of 4.2. Also the! postfix operator is available with them:

The code generated by the AOT compiler would include the non-null assertion operator, enabling you to perform a strict null check in all of your templates!

There are also several new test methods which are added in the new release for a convenient programming experience which includes ‘overrideProvider’, ‘flush’ and ‘WhenRenderingDone’.


The ‘overrideProvider’ method is added to the TestBed for overriding a provider, without focusing on how it is defined and who is declared the provider.


WhenRenderingDone methods are added to ComponentFixture. It is similar to whenStable method, however, it emphases on waiting the animations which are to be done.


Flush function assists in automatically wait till all the macro-task events, such as timeout, have been moved out from the event queue. The tick calls are required to be swapped by this newer function.

There are several updates progressing in the Angular team to reduce the bundle size of applications with Google Closure Compiler. Stay tuned with Cubet to learn more about them which will out be pretty soon!

Talk to our IT Professionals

Other Blogs:


Got a similar project idea?

Connect with us & let’s start the journey!

Questions about our products and services?

We're here to support you.

Staff augmentation is a flexible workforce strategy companies adopt to meet specific project needs or address skill gaps.

Begin your journey!
Need more help?