sainture
12/17/2017 - 1:35 AM

Update packages - ng update

ng update

ncu - older way

-- NEW WAY

ng update @angular/cli @angular/core

https://update.angular.io/  


// just in case ng update doesn't make the necessary changes in your files, you can manually run it to make the changes (ex: fix import statements)
ng update @angular/cli --from 7 --to 8 --migrate-only
ng update @angular/core --from 7 --to 8 --migrate-only





-- OLD WAY

# npm-check-updates utility is a nice tool to check updates for your packages

# Install npm-check-updates
  npm install -g npm-check-updates

# see packages with new versions
  ncu

# update package.json file with new versions of all packages
  ncu -u
  
# see specific packages' versions
  ncu @angular/material, @angular/forms
  
# update package.json for specific packages
  ncu -u @angular/material, @angular/forms
  
# update package.json for packages with range values (^)
  ncu -a @angular/material, @angular/forms
  
# once package.json is updated, you can run "npm install" to install the new versions