I thought VS 2013 is supposed to have support for angularjs attribute intellisense? For some reason it's not working for me on the latest version of Microsoft Visual Studio Ultimate 2013 version 12.0.21005.1
Getting the following validation warning:
Attribute 'ng-app' is not a valid attribute of element 'html'.
Attribute 'ng-view' is not a valid attribute of element 'div'.
Am i missing an xsd reference somewhere?
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.
To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.
I had the same problem and I did the following and it helped.
If you are using ReSharper, you can add an extension that will give you Intellisense, and won't raise a warning.
Top Menu in VS>Resharper>Extension Manager>Search AngularJS This will add angular js intellisense.
-------EDIT-------
Using Resharper 8.2.1
I know this is old, but it was still happening for me. To fix it for VS 2013, follow these instructions:
1) Open the file C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\schemas\html\commonHTML5Types.xsd
2) Find the area in the file that starts with this line:
<xsd:attribute name="translate">
. Scroll down about 7 lines to find the corresponding closing tag: </xsd:attribute>
3) Just above the </xsd:attributeGroup>
closing tag, paste the following lines of code:
<xsd:attribute name="ng-app" vs:category="Angular" />
<xsd:attribute name="ng-bind-html" vs:category="Angular" />
<xsd:attribute name="ng-bind-html-unsafe" vs:category="Angular" />
<xsd:attribute name="ng-bind-template" vs:category="Angular" />
<xsd:attribute name="ng-checked" vs:category="Angular" />
<xsd:attribute name="ng-class" vs:category="Angular" />
<xsd:attribute name="ng-class-even" vs:category="Angular" />
<xsd:attribute name="ng-class-odd" vs:category="Angular" />
<xsd:attribute name="ng-click" vs:category="Angular" />
<xsd:attribute name="ng-cloak" vs:category="Angular" />
<xsd:attribute name="ng-controller" vs:category="Angular" />
<xsd:attribute name="ng-csp" vs:category="Angular" />
<xsd:attribute name="ng-dblclick" vs:category="Angular" />
<xsd:attribute name="ng-disabled" vs:category="Angular" />
<xsd:attribute name="ng-form" vs:category="Angular" />
<xsd:attribute name="ng-hide" vs:category="Angular" />
<xsd:attribute name="ng-href" vs:category="Angular" />
<xsd:attribute name="ng-include" vs:category="Angular" />
<xsd:attribute name="ng-init" vs:category="Angular" />
<xsd:attribute name="ng-list" vs:category="Angular" />
<xsd:attribute name="ng-model" vs:category="Angular" />
<xsd:attribute name="ng-mousedown" vs:category="Angular" />
<xsd:attribute name="ng-mouseenter" vs:category="Angular" />
<xsd:attribute name="ng-mouseleave" vs:category="Angular" />
<xsd:attribute name="ng-mousemove" vs:category="Angular" />
<xsd:attribute name="ng-mouseover" vs:category="Angular" />
<xsd:attribute name="ng-mouseup" vs:category="Angular" />
<xsd:attribute name="ng-multiple" vs:category="Angular" />
<xsd:attribute name="ng-non-bindable" vs:category="Angular" />
<xsd:attribute name="ng-readonly" vs:category="Angular" />
<xsd:attribute name="ng-repeat" vs:category="Angular" />
<xsd:attribute name="ng-selected" vs:category="Angular" />
<xsd:attribute name="ng-show" vs:category="Angular" />
<xsd:attribute name="ng-src" vs:category="Angular" />
<xsd:attribute name="ng-style" vs:category="Angular" />
<xsd:attribute name="ng-switch" vs:category="Angular" />
<xsd:attribute name="ng-transclude" vs:category="Angular" />
<xsd:attribute name="ng-view" vs:category="Angular" />
Save the file and reopen VS2013. This should fix the issue.
I installed http://vswebessentials.com/
created a file called _reference.js with content
/// <autosync enabled="true" />
/// <reference path="angular.js" />
/// <reference path="underscore.js" />
I learned about it from The Story Behind _references.js
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