1.( 在项目目录下使用命令行工具)
如果用命令安装一些模块时候报4080错误,并且让用管理员权限运行时候,安装命令后续加上
ps: npm install bootstrap --save -no-optional
ng g module confirm-order --routing
ng g component confirm-order
(注意顺序,先创建module,然后增加组件时angular-cli会自动将component导入到module中)
2.angular中安装了bootstrap 在.angular-cli.json 中引入全局样式的时候需手动加上路径,不能复制或者快捷命令,原因如下:
.angular-cli.json'文件并删除所有'node_modules'文件,并手动输入所 script和css的路径。
如果报这种错误
image.png
那么你还要安装pooperJs 原因如下:
https://getbootstrap.com/docs/4.0/getting-started/introduction/
image.png







网友评论