加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – Angular 2不导入Bootstrap css

发布时间:2020-12-17 20:41:15 所属栏目:安全 来源:网络整理
导读:直接从 https://angular.io/docs/ts/latest/guide/forms.html Let’s add the stylesheet. Open a terminal window in the application root folder and enter the command: npm install bootstrap –save Open index.html and add the following link to th
直接从 https://angular.io/docs/ts/latest/guide/forms.html

Let’s add the stylesheet.

Open a terminal window in the application root folder and enter the command:

npm install bootstrap –save

Open index.html and add the following link to the head.

link rel=”stylesheet” href=”node_modules/bootstrap/dist/css/bootstrap.min.css”>

但是,我一直得到404

GET 07001

它在我添加带有在线地址的脚本时有效,但为什么angular无法找到我文件的路径?

解决方法

当index.html与node_modules位于同一目录时,它正在工作.

从angular-CLI put添加bootstrap

“引导/距离/ ** / *. (JS | css.map | CSS | EOT | SVG | TTF | WOFF | woff2)”

在angular-cli-build.js和run ng build中

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读