Here are the steps to upgrade Angular 4 to Angular 5. It only took me a few hours to upgrade.
1. Upgrade TypeScript to ^2.4.2
npm install typescript@2.4 --save-dev2. Upgrade RXJS to ^5.5.0
npm install rxjs@^5.5.0 --save
3. Upgrade Angular Material to ^5.2.4
npm install
@angular/cdk@^5.2.4 @angular/material@^5.2.4 --save
4. Upgrade Angular to ^5.2.9
npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest --save
5. Update Material Modules
$ npm install -g angular-material-prefix-updater
$ mat-switcher -p tsconfig.json
6. Upgrade Angular CLI (Optional)
Also, most likely you want to also update your local
project version, because inside your project directory it will be selected with
higher priority than the global one:
npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli@latest
npm install
No comments:
Post a Comment