简体   繁体   English

如何在现有项目中添加角材料?

[英]How to add Angular Material in exists project?

I have created Angular 2 project. 我已经创建了Angular 2项目。

I tried to add Angular Material in exists project using this npm command( official documentation ): 我试图使用此npm命令( 官方文档 )在现有项目中添加Angular Material

npm install --save @angular/material @angular/cdk

After installed I get a lot of errors when I tried to launch npm server . 安装后,当我尝试启动npm server时遇到很多错误。 Seem it does not work directly with exists project. 似乎它不能直接与现有项目一起使用。

How to add Angular Material correctly in project? 如何在项目中正确添加角材料? I use also: Yarn, Webpack 我还使用: Yarn, Webpack

I cannot help with Yarn or Webpack . 我无法帮助YarnWebpack 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 . 但是我发现对使Angular Material起作用最有用的文章是[] 设置您的第一个 Angular -2-project-using-angular-material2 Hope this works for you too. 希望这对您也有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM