Raj
Raj

Reputation: 1120

Updating Angular material packages(@angular/cdk and @angular/material) to beta version

i am working on an angular-v6 app. Need drag and drop feature which is available in v7-beta2

  1. Is it safe to use a beta version in my app? (will other material componets from v6 work fine?). on updating if other mat components break, how to degrade the version, back to v6?
  2. If updating is safe, how can i update my package cdk and material? currently i have "@angular/cdk": "^6.2.0", and "@angular/material": "^6.2.0",.
  3. Should i also update any other package apart from cdk and material

Thanks in advance.

Upvotes: 2

Views: 8309

Answers (2)

mQuiroz
mQuiroz

Reputation: 1378

Update the packages below if you are using them:

npm install @angular/cdk@latest @angular/material@latest @angular/material-moment-adapter@latest

or

one at a time

 npm install @angular/cdk@latest
 npm install @angular/material@latest 
 npm install @angular/material-moment-adapter@latest

Upvotes: 2

Nasiruddin Saiyed
Nasiruddin Saiyed

Reputation: 1466

First of all you need to install latest beta version of @angular/cli you can install it by npm as follows

npm i -g @angular/cli@next

Note :: you may be needed sudo if there is permission issue.

Second never depends on 100% beta versions as it may broke in Production you may got into serious problems

and as there is another way of adding Material design by Angular Devkit 6+ you need to just run in your existing project it will add stable version of @angular/material which is supported by your cli version.

ng add @angular/material

To update packages you can try ng update for lower angular version projects there is official support page for version updating methods.

Its better to wait until stable version release.

Upvotes: 2

Related Questions