【问题标题】:how to include Bootstrap.css in angular2 final release如何在 angular2 最终版本中包含 Bootstrap.css
【发布时间】:2016-09-27 13:02:37
【问题描述】:

我正在尝试在 angular2 最终版本中本地包含 bootstrap.css。

我将 bootstrap.css 放在 dist/assets/css 文件夹中。

在 index.html 我放了

<link rel="stylesheet" href="./assets/css/bootstrap.css" />

但它不起作用。

不知道怎么回事。

项目是通过angular-cli生成的。

请帮忙。

谢谢

【问题讨论】:

    标签: angular


    【解决方案1】:

    当您使用angular-cli 时,您可以按照Global Library Installation 中提供的步骤更新您的angular-cli.json

    【讨论】:

      【解决方案2】:

      不要放在 dist 文件夹中。把它放在别的地方,你可以放在 app/assets 里面。在构建 dist 文件夹被覆盖。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-01-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-27
        相关资源
        最近更新 更多