AngularJS intellisense in Visual Studio 2012
As a .Net developer Visual Studio is my greatest power. This robust, adaptable and powerful IDE provides everything I could possibly need.
But with upcoming new JavaScript technologies like Node and Single Page Applications, it sometimes falls short. It's not that Visual Studio is bad for creating JavaScript applications, but it could do better.
AngularJS intellisense support is a good example of a missing feature, as it is neither included in the Visual Studio core or in the Web Essentials extension.
AngularJS intellisense
Fortunately, Visual Studio is highly adaptable. You can hack the AngularJS intellisense support in yourself!
There are two ways of doing this, one for ReSharper users and one for Non-ReSharper users.
Non-ReSharper users
Locate the CommonHTML5Types.xsd file in your Visual Studio install folder.
Mine is located here: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html.
Once you find the xsd file, take a backup (you never know), and replace it with the one that Mads Kristensen (@mkristensen) created. Restart your visual studio and you should have AngularJS intellisense working.
For Resharper users
There is a plugin for ReSharper 7.1 and 8.0 that adds support for AngularJS.
To install in ReSharper 8:
You can install this plugin directly into ReSharper 8.0 via the Extension Manager in the ReSharper menu. Since the package is currently pre-release for 8.0 (nightly builds might introduce breaking changes), make sure "Include prerelease" is selected in the dialog.
To install in ReSharper 7.1:
- Download the zip file: resharper-angularjs.1.1.0.zip
- Extract everything
- Run the Install-AngularJS.7.1.bat file
The Resharper plugin can be found on github here.