I have created Angular 2 project.
I tried to add Angular Material in exists project using this npm command( official documentation ):
npm install --save @angular/material @angular/cdk
After installed I get a lot of errors when I tried to launch npm server
. Seem it does not work directly with exists project.
How to add Angular Material correctly in project? I use also: Yarn, Webpack
I cannot help with Yarn
or Webpack
. But the article I have found most useful in getting Angular Material to work is this] setting-up-your-first-angular-2-project-using-angular-material2 . Hope this works for you too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.