upgrade angular version code example
Example 1: update angular cli
npm uninstall -g @angular-cli
npm install -g @angular/cli@latest
Example 2: downgrade angular version in project
Try like this :
ng --version
npm uninstall -g @angular/cli
npm cache clean --force
npm install -g @angular/[email protected]
ng --version
Example 3: how to update angular version
content_copy
ng update @angular/cli @angular/core
Example 4: angular 8 to 9
First, update to the latest version of 8
ng update @angular/cli@8 @angular/core@8
Then, update to 9
ng update @angular/cli @angular/core
Example 5: update angular
npm uninstall -g @angular-cli
npm install -g @angular/cli@latest
Example 6: update angular to specific version
ng update @angular/[email protected] @angular/[email protected]