How do I get intellisense for AngularJS in VSCode?

So can anyone help me get AngularJS intellisense to work in Visual Studio Code?

Can this be configured globally or only used for each project? I prefer looking for a solution on how to do this globally since anytime I open VSCode AngularJS intellisense only works.

I am currently using AngularJS 1.5.x. I don't know if it can be customized according to the AngularJS version in use. Also, I am using VSCode 1.10.2 and VSCode - Insiders on Windows 10.

I've searched several places already, but the solutions I found didn't work for me. Maybe because they are old.

+3


source to share


1 answer


There are many extensions for intellisense in Angular (2+) but not for AngularJS. However, this article by Mike Barlow explains how to do it, and it's pretty recent since you asked your question (June 2016).

Here's a quick summary of what you need to do in the article:



  • The following tools are installed: node.js 6.2+, npm 3.9+ and VSCode 1.2+.
  • Set the typing package worldwide: npm install -g typings

    . Make sure it's version 1.X.
  • Install AngularJS types: typings install dt~angular --save --global

  • This should create a folder typings\globals\angular\

    with a file named "typings.json"
  • Create a file in this directory as sibling for "typings.json" called "jsconfig.json". This file can be left empty if you don't need to forward code (i.e. using typescript, coffeescript, etc.).
  • Restart VSCode
+1


source







All Articles