Angular material version for angular 5 app
12,931
Solution 1
With Angular 5, you can use angular material 5. Execute the following commands to install ver 5.2.5
of @angular/material
and @angular/cdk
:
npm install --save @angular/[email protected]
npm install --save @angular/[email protected]
Solution 2
For the newer version of angular v.6.0 you can use :
npm install --save @angular/[email protected]
npm install --save @angular/[email protected]
One new command is added in the latest CLI ver. (you need to update to the latest ver of CLI)
ng add @angular/material
this will automatically add the compatible ver in the package.json file.
![arun kumar](https://lh3.googleusercontent.com/-kjgMzRncLI8/AAAAAAAAAAI/AAAAAAAAAdk/TcCHfdrnJKo/photo.jpg?sz=256)
Author by
arun kumar
Updated on July 17, 2022Comments
-
arun kumar almost 2 years
I'm building an angular5 application for this I need angular material, which version of angular material compatible with angular 5 application and how to install it.
-
arun kumar about 6 yearswhat is the use of angular cdk
-
Faisal about 6 yearsThe Angular CDK gives developers solid, well-tested tools to add common interaction patterns with minimal effort. Read more about it here: blog.angular.io/a-component-dev-kit-for-angular-9f06e3b4b3b4
-
javan.rajpopat about 5 years@Faisal I am currently on angular version 6.1.10 and I recently downloaded the latest version of /material and /cdk. My question is, will version 8.0.0 of /material be compatible with version 6.1.10 of Angular??
-
kravisingh about 5 years@javan.rajpopat It's not compatible.
-
javan.rajpopat about 5 years@Faisal Thank you for the fast response! :)
-
Sachin Parashar almost 5 yearsApart from material and cdk, you might also need to install @angular/animations.