angular学习2

时间:2023-03-09 20:48:20
angular学习2

1.为了在angular里面使用bootstrap,可以如下操作

(1)停止正在运行的终端指令:ctrl+c

(2)在终端里面输入:npm install bootstrap --save

(3)在Visio studio 里面的node_module找到bootstrap\dist\css下面的bootstrap.min.css,将其路径拷贝下来

(4)在工程下面的style.css 里面导入(3)拷贝下来的相对路径:

      @import '~bootstrap\dist\css\bootstrap.min.css';
(5)回到bootstrap的官网找样式:getbootstrap.com--docunmentation--components,将你喜欢的样式拷贝下来
(6)将拷贝下来的样式加到需要修饰的工程app\app.component.html里面

(7)最后,记得在终端重启服务:ng serve --open

angular学习2

angular学习2