Here is the latest release of Angular 8.0.0. This is one of the major
Before Update
- If you are using
HttpModule
, then change it toHttpClientModule
.
- If you are using
Http
service, then change it toHttpClient
Service.
- Make sure you are using
Node 12
or later. Click below link to update your Node.
- Once you and all of your dependencies have updated to RxJS 6, remove
rxjs-compat
- If you use the Angular Service worker, migrate any
versionedFiles
to thefiles
array. The behavior is the same.
Update to Angular 8 version
You can update to angular 8 framework and CLI by using this command.
ng update @angular/cli @angular/core
Note: If you need any help regarding
ng update
command, you can check this link: angular.io
When using new versions of the CLI, you will be asked if you want to opt-in to share your CLI usage data. You can also add your own Google Analytics account. This lets us make better decisions about which CLI features to prioritize, and measure the impact of our improvements. Learn more on angular.io
If you ViewChild
ContentChild
@ContentChild('foo', {static: false}) foo !: ElementRef;
ng update
will update your queries automatically, but it will err on the side of making your static
After Update
For lazy loaded modules via the router, importing via string is deprecated. ng update
will take care of this automatically.
In version 8, the string syntax for loadChildren
import()
Before
After
Summary
The Angular team is doing a great job — which makes our job (and life) much easier. With every version, the update is smoother and smoother. So the update should be painless and probably won’t take a lot of time.
Pingback: itemprop="name">Update Angular 7 to Angular 8 – ZeptoBook – Angular Questions
Pingback: itemprop="name">Best Chrome Extensions For Debugging Angular Apps - ZeptoBook