Angular 6, as we all know is the latest and advanced version of Angular Family. We can easily update our old packages and create new elements in it. Below is the list of elements:-
1) ng add:- ng add is similar to npm install, it helps us in adding the new package in angular apps.
ng add angular/elements
2) ng update:- It is used to update the existing packages in the node modules. Suppose, if we want to update from Angular 5 to Angular 6, it will reduce a lot of effort.
ng update angular/core
3) Earlier we have to provide any services in providers array in app.module.ts, in order to register that particular service. Now, in Angular6, you can provide any services in it parent class only but putting the providedIn: root property with @Injectable Decorator.
import {Injectable} from '@angular/core'
@Injectable{(
providedIn:'root'
)}
4) We can use ng-template instead of template to render the HTML and it works for structural directives ngFor and ngIf
So , to conclude , we can take advantage of these extra features which are added in Angular 6. This will make our life easier.
More From Oodles
Ready to innovate? Let's get in touch
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Palak Sharma
Palak is enthusiastic and passionate about coding , Her areas of expertise in coding languages are JavaScript and angular , html and css .