How do I get Angular Material 2 to work with Angular 4?
- I re-installed Angular CLI and now it is at 1.0.0 using: npm install -g @angular/cli
- I created a new Angular 4 project using: ng new MyProject
- I tried to install Material 2 but it failed using: npm install --save @angular/material
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
-- @angular/[email protected]
Here is what I get when I do a ng -v for the project:
@angular/cli: 1.0.0
node: 6.10.0
os: win32 x64
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
matewka :
Angular Material v2.0.0-beta.3 is now released. It depends on Angular 4. Go ahead, and install it.\n\nnpm i @angular/material --save\n\nIf you already used previous version of the package, you might want to perform some changes in your project, according to the CHANGELOG.md",
2017-04-10T09:12:01
Greg Finzer :
According to the Angular Material 2 Team it will be a few days until there is a new release that is compatible with Angular 4. \n\nYou can use the latest version from master:\n\nnpm install --save https://github.com/angular/material2-builds.git\n",
2017-03-28T15:36:56
larsl :
This question is kind of old but I stumbled upon it as I was just getting to work Angular with Material.\n\nInstalling the latest version of material2 will make it depend on Angular 5. If you want to get it to work with Angular 4 you can install the latest version before the breaking change:\n\nnpm install --save @angular/
[email protected] @angular/
[email protected]\n",
2017-11-14T20:37:28