0
votes

I am trying to use angular material with angular 2(As angular 4 is not an option to use because of other project dependencies) .But i think the official ,angular material page has moved to angular 4 and it doesnt support with angular 2 anymore .Because when i tried to use it with my angular 2 project using the command'

npm install --save @angular/material

i got the error

+-- UNMET PEER DEPENDENCY @angular/[email protected] +-- UNMET PEER DEPENDENCY @angular/[email protected] -- @angular/[email protected] -- [email protected] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch okidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} ) npm WARN @angular/[email protected] requires a peer of @angular/core@^4.0.0 but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/common@^4.0. 0 but none was installed.

So my question is

1.Does angular material is still supported with angular2 ,if yes why am i getting the error

1.2.If not is there anyway i can use material design with angular2 project

Please help.Thank you

1

1 Answers

1
votes

From Angular 2.0.0 beta 3, Angular 4 is mandatory https://github.com/angular/material2/blob/master/CHANGELOG.md#200-beta3-cesium-cephalopod-2017-04-07

So Use angular 2.0.0 beta 2

npm install --save @angular/[email protected]