简体   繁体   English

Angular 上的 html 文件中的引导类没有智能感知 - Visual Studio 2017

[英]No intellisense for bootstrap classes in html files on Angular - visual studio 2017

Using Angular project in Visual Studio 2017 (not VS code) how can I enable intelliSense for bootstrap classes inside the html files, I tried to add it in the angular-cli.json file using the unminified css:在 Visual Studio 2017 中使用 Angular 项目(不是 VS 代码)如何为 html 文件中的引导类启用智能感知,我尝试使用未缩小的 css 将其添加到angular-cli.json文件中:

"styles": [
        "styles.css",
        "../node_modules/bootstrap/dist/css/bootstrap.css"
      ],

Also tried using the styles.css还尝试使用styles.css

@import "../node_modules/bootstrap/dist/css/bootstrap.css"

Not Working...不工作...

Any help is very appreciated非常感谢任何帮助

Thanks谢谢

在使用 Angular 等框架时,我们可以使用 npm、bower 安装依赖项,并将未压缩的 css 文件添加到项目中,然后我们可以发现智能感知按预期工作,请查看此文档

You can install VSCode extension IntelliSense for CSS class names in HTML , even though there is a small glitch in this extension.您可以为 HTML 中的 CSS 类名称安装 VSCode 扩展 IntelliSense ,即使此扩展中有一个小故障。 You have to type the whole tag , move to another line and come back to class name.您必须输入整个标签,移动到另一行并返回类名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM