Notion behind the release of Angular 5

Posted By : Palak Sharma | 17-Nov-2017

So when we talk about Angular , what comes into our mind is of  now is that it is common tool to build our application with more ease and less complexity to render our view model and controller  simultaneously . Well , here comes a boom in Angular family , now we have been introduced with the version 5. 

So , now the question arises what is new in Angular 5 ??? . Well here is the some basic features  which is been introduced to us . 

1) Internalization:- Angular 5 released with new number , currency and date pipes which is used to increase the standardization across the broswers and eliminates the dependency of il8n  . To have access of locale earlier we have to inject the dependency from 'Deprecatedil8NPipesModule' from 'Common Module'. 

 

2) Use of Decorators:- Angular 5 now provides us decorator support with more concise manner. Earlier we have to use named function to provide the useValue to the components , but now it provides us expression lowering of lambdas.

In Angular 4 , what we use:-

 
Component({
    provider: [{provide: 'token', useValue: calculated()}]
  })
  export class MyClass {}
 

In Angular 5 , what we have get:-

 
  Component({
    provider: [{provide: 'token', useFactory: () => null}]
  })
  export class MyClass {}
 

 

3. Build Optimization:-  Angular 5 comes with more build optimization techniques , angular build optimizer will remove the code decorator's before runtime only and thus it will also reduce the part which is not needed in runtime through tree shaking , which leads to the faster and decreased bundle size and thus willl increase the performance of application.

 

4. Angular Universal Transfer API:- In Angular 5 "Domino" is  added to platform server and will increase the DOM manipulations. Also , they have added two module i.e. ServerTransferStateModule and BrowserTransferModule, these modules allows us  to generate information as a part of your rendering with platform server rather on leaving to client side, it transfers state from the server which means developers will not send  HTTP request once the application is run.

 

5.Faster Complier :- Angular 5 gives us the more leverages over compliation it increases the performance and boost the application more faster . With the  " ng build --aot"  it reduces the bundle size into more chunks and reduces the 95% of build time. 

 

6. Form Validation : -  Angular 5 provides us the feature now when the value of a field or a form updated via blur or on submit , instead of every input event . 

For eg:- <form [ngFormOptions]={"updateOn":'submit'}">

Earlier we have to use the , <input name="text" [ngModelOptions]="{"updateOn: blur}">

 

7. Animations:- We have got two more aliases in Angular 5 , i.e incerment and decrement to use to enhance our animation. 

 

8. Router Lifecycle :-  Angular 5 has introduced new events in terms of  tracking the cycle of  the router from start of  running gurads through completion of activation. For eg:- GuardsCheckStart , ActivationStart , GuardsCheckEnd , ChildActivationEnd , Resolve Start , Resolve End. 

Now we can configure the router to reload the page when it receives a request to naigate to some respective url.

 

To conclude with Angular 5  has basically give us more benefits in terms of performance and rendering , using of aot and lazy loading and also the compilation issues which we are facing in Angular 4 are all covered in Angular 5 with less performance issues. 

About Author

Author Image
Palak Sharma

Palak is enthusiastic and passionate about coding , Her areas of expertise in coding languages are JavaScript and angular , html and css .

Request for Proposal

Name is required

Comment is required

Sending message..