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.
Your @angular/material and @angular/cdk versions are 8 while your Angular version is 7. You need to change your @angular/material and @angular/cdk versions to 7.
The latest version as we have seen is 12.1.
Looks like you can use npm ls @angular/material to tell you the exact version. Show activity on this post. which will display something like that: { "name": "angular-material", "version": "0.11.
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]
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With