Reputation: 305
I am creating my first project in express for web 2015. I created a sample app.html file and here is the code. Intellisense is working properly.
Now I created another js file in controller folder. The intellisense doesn't work here.
I have 2 questions:
1) Is it supposed to work here ?
2) if yes, why its not working for me ?
Upvotes: 0
Views: 902
Reputation: 305
I followed the previous answer and did following steps on top of it :
Added a reference.js file in scripts folder (same lever where angular exists) and intellisense is working now. This is the content of reference file:
/// <autosync enabled="true" />
/// <reference path="../controllers/sportsStore.js" />
/// <reference path="../ngmodules/angular-resource.js" />
/// <reference path="../ngmodules/angular-route.js" />
/// <reference path="ai.0.15.0-build58334.min.js" />
/// <reference path="angular.js" />
/// <reference path="angular-mocks.js" />
Upvotes: 0
Reputation: 20955
1) Is it supposed to work here ?
Ans: No. Not out of the box, but that can be fixed (see #2)
2) if yes, why its not working for me ?
Ans: You need to install the AngularJS extension for Visual Studio that John Bledsoe, a member of the Visual Studio community, created.
To do this, download the angular.intellisense.js file and place it in the Program Files (x86)\Microsoft Visual Studio 12.0\JavaScript\References
folder on your PC.
This extension works the same with any project that uses JavaScript, including Apache Cordova, ASP.NET, LightSwitch, and Windows Store apps, among others.
Source: The Visual Studio Blog
Upvotes: 2