According to this post intellisense should also be working on the new VS 2015, but so far I only get intellisense for the angular object and not for the dependencies or my custom modules.
Here's what I did:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References
I also added the file to the same place as my angular.js but it still didn't work. The question that I have in this case is, where should I place the file? on the angular public folder with only my angular.js, or on my dev angular folder where all the files downloaded from bower are.
I also tried addind it directly into the tools/options/text editor/javascriptr/intellisense/reference menu, on the Implicit(Web) reference group, but it still didn't work.
On my project I have the following folder structure inside the src folder:
As a side note, I don't have a /scripts folder and therefore no /scripts/_references.js
file
.
If you prefer to enable AngularJS intellisene for all of your web projects, simply save the angular. intellisense. js file to your %PROGRAMFILES%\Microsoft Visual Studio 12.0\JavaScript\References folder.
This was not working for me in Visual Studio 2015 RTM in a web project, but I solved the problem.
This project was not created with Visual Studio and does not have a _references.js
file anywhere. So I think this will work in any situation.
I removed all other intellisense resources from within the VS UI to make sure what I did was what fixed it.
Tools, Options, Text Editor, Javascript, Intellisense, References
. Choose the appropriate Reference Group; for most web project this is Implicit (Web)
. Paste the url at the bottom text box and click the Add button. Don't dismiss the dialog box yet. Text Editor, Javascript, Intellisense, General
, make sure the check box is checked for Download remote references
._references.js
to the root of your project. Don't bother making a Scripts
folder. Right click on it and choose auto-sync, then choose update. Go into it and remove any js files created by a build process. If you don't, they can be so large they will break intellisense. Be prepared for a ~5-10 second delay the first time you use intellisense, as it has to load all these references from your project.As @Balthasar pointed out (and in case you are using Resharper) you will need to enable intellisense from Visual Studio for it to work:
Resharper -> options -> environment -> intellisense -> general, select 'Custom Intellisense' and for Javascript you can select Visual studio. Alternatively you can use the 'Visual Studio' statement completion (second option)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With