简体   繁体   中英

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?

Assuming you mean Angular and not 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).

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. 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...

Your only options are pretty much the following:-

  1. Write your own VS extension to implement it
  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)
  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)
  5. Use VS2017 and live without the.html file intellisense
  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...

Here's a few related links that I could find, there doesn't seem to be much...

github issue visual studio developer community

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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