简体   繁体   English

Visual Studio 2017 Angular 材料智能感知和代码片段

[英]Visual studio 2017 Angular material intellisense and code snippets

I am unable to view the 'Intellisense' for angular material components in html in visual studio 2017.do I need do any additional configurations/setup?我无法在 visual studio 2017 中查看 html 中角度材料组件的“Intellisense”。我需要做任何额外的配置/设置吗?

Assuming you mean Angular and not AngularJS...假设你的意思是 Angular 而不是 AngularJS ...

The answer is no you don't need anything else as its not currently possible.答案是否定的,您不需要任何其他东西,因为目前不可能。 It was previously possible when Microsoft implemented intellisense using.ngml files in a previous VS2017 version, but they never then updated it to work on.html files (which is your only option if you are using the Angular CLI to create your app).当微软在以前的 VS2017 版本中使用 .ngml 文件实现智能感知时,以前是可能的,但他们从未更新它以处理 .html 文件(如果你使用 Angular CLI 创建你的应用程序,这是你唯一的选择)。

I've also tried the (current) preview of Visual Studio 2019 and it's not implemented there either unfortunately, don't know if it will be.我也尝试过 Visual Studio 2019 的(当前)预览版,不幸的是它也没有在那里实现,不知道它是否会。 There doesn't seem to be much 'push' from people to get Microsoft to (re)implement it apart from a few requests here and there, so I'm guessing either people aren't using VS2017 for their Angular stuff or they are and have just accepted there's no intellisense in the.html files...人们似乎没有太多“推动”让微软(重新)实现它,除了一些请求之外,所以我猜要么人们没有使用 VS2017 来处理他们的 Angular 东西,要么他们是并且刚刚接受了.html文件中没有智能感知......

Your only options are pretty much the following:-您唯一的选择几乎如下:-

  1. Write your own VS extension to implement it自己写VS扩展来实现
  2. Wait for Microsoft to implement it等待微软实施
  3. Don't use the Angular CLI and instead construct your app with webpack where you can configure everything yourself (not recommended)不要使用 Angular CLI,而是使用 webpack 构建您的应用程序,您可以在其中自行配置所有内容(不推荐)
  4. Use another editor such as Visual Studio Code for your Angular stuff where the Angular intellisense works (personally I do this with VS2017 for my .NET core API and VSCode for Angular frontend - though I wish I could just stick with VS2017 for all)使用另一个编辑器,例如 Visual Studio Code 来处理 Angular 智能感知工作的 Angular 内容(我个人使用 VS2017 来处理我的 .NET 核心 API,使用 VSCode 来处理 Angular 前端——尽管我希望我可以坚持使用 VS2017)
  5. Use VS2017 and live without the.html file intellisense使用 VS2017 并在没有 .html 文件智能感知的情况下生活
  6. Try ReSharper as someone stated there's Angular completion in.html files - however, I've tried it and I couldn't get it too work, plus its a paid extension...尝试ReSharper ,因为有人说在 .html 文件中有 Angular 完成 - 但是,我已经尝试过了,但我无法让它工作,加上它的付费扩展......

Here's a few related links that I could find, there doesn't seem to be much...这是我能找到的一些相关链接,似乎没有太多...

github issue visual studio developer community github issue visual studio 开发者社区

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

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