Introduction to Angular 8:
In this tutorial, you will learn how to update your angular project to the latest version.
Angular 8 uses:
Typescript 3.4
Node 10 or later
Features:
Angular Ivy: Ivy is the angular’s next-generation compilation and rendering pipeline. From angular 8, we can choose to opt-in for using angular ivy, use preview of angular ivy, use @angular/core@next. Update your angular application to 8.1.x rather 8.0.x
Differential Loading: In differential loading process the browser chooses between modern or legacy JavaScript based on its own capabilities. When the application gets loaded, it will automatically load the bundle it needs.
Update Steps:
Step 1: Update Angular CLI
Update your angular CLI by the following command:
npm install -g @angular/cli@latestStep 2: Update to Angular 8
Update core framework and CLI by the following command:
ng update @angular/cli @angular/core
Step 3: Update Angular-material (Optional):
If you are using angular-material in your application. Then update it to the latest version by the following command:
ng update @angular/material
Step 4: Making changes in your code:
If you use ViewChild and ContentChild, the angular team updated these to resolve these queries and to give more control to developers. ng update command will update your queries automatically. But if any problem occurs, you have to manually make changes in your code.
Ex. @ContentChild(‘foo’, {static: false}) foo !: ElementRef;
No comments:
Post a Comment