更新时间:2023-09-30 09:48:10
在您已经安装angular-cli并创建了项目之后
使用以下命令安装material-desgin-lite:
after you already installed angular-cli and created a project
install material-desgin-lite with:
npm install material-design-lite --save
一旦完成安装,请在项目的根目录上打开.angular-cli.json
并添加以下行:
Once intalled open the .angular-cli.json
on the root directory of your project and add the following lines:
"styles":
["../node_modules/material-design-lite/material.min.css"],
"scripts":
["../node_modules/material-design-lite/material.min.js"],
保存文件并使用以下命令启动服务器:ng serve
Save the file and the start the server with: ng serve
在代码中使用所需的CSS类和其他组件.
Use the desired css classes and other components in your code.