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.

angularjs intellisense

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:

The Resharper plugin can be found on github here.

You might enjoy


Say you want to bind a string to an element in Angular. No real problem, you just use expressions…

As JavaScript applications grow larger over time, the need for better development practices grow with them. The time that…

Tim Sommer

I'm a Web Developer with +7 years of experience in the .Net framework, with a focus on HTML5 and JavaScript.

Belgium, Antwerp
comments powered by Disqus
OWIC
Member of The Internet Defense League