Following are the steps to upgrade -
1. We first need to update the Angular version globally by inserting the latest version via the terminal: sudo npm install -g @angular/cli@latest.
2. Second step is to upgrade the version locally in your project and need to assure the altering for the new version are displayed in the package.json file ng update @angular/cli
3. When it is done, upgrade all your dependencies and dev dependencies in package.json
4. To build Angular applications, Angular-devkit was introduced in Angular 6 that needs the dependency on the CLI projects.
5. With all of this, you'll also require to upgrade the version for Typescriptnpm install
[email protected] --save-dev
6. Then, you need to relocate the configuration of angular-cli.json to angular.json ng update @angular/cli and ng update @angular/core.
7. Use this command: ng update @angular/material in case of Angular material is used.
8. The next step is the removal of deprecated RxJS 6 features npm install -g rxjs-tslint rxjs-5-to-6-migrate -p src/tsconfig.app.json
9. When it is done, uninstall rxjs-compat as it is not required for Angular npm uninstall --save rxjs-compat
10. Also change import { Observable } from 'rxjs/Observable'; to import { Observable } from 'rxjs';
11. Finally, you are able to start your Angular 7 application by using ng serve