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.
Asked
Active
Viewed 1.4k times
10
-
Use Angular 6. Material is a schematics and can be easily imported. – May 30 '18 at 07:27
2 Answers
24
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/material@5.2.5
npm install --save @angular/cdk@5.2.5

FAISAL
- 33,618
- 10
- 97
- 105
-
-
1The Angular CDK gives developers solid, well-tested tools to add common interaction patterns with minimal effort. Read more about it here: https://blog.angular.io/a-component-dev-kit-for-angular-9f06e3b4b3b4 – FAISAL May 30 '18 at 08:50
-
@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?? – javan.rajpopat Jun 05 '19 at 12:57
-
-
4
For the newer version of angular v.6.0 you can use :
npm install --save @angular/material@6.2.1
npm install --save @angular/cdk@6.0.0
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.

Abhishek Gautam
- 1,617
- 3
- 18
- 29
-
Apart from material and cdk, you might also need to install @angular/animations. – Sachin Parashar Sep 05 '19 at 11:36