Visual Studio 2013 AngularJS intellisense support

I thought VS 2013 should have support for the angularjs intellisense attribute? For some reason, it does not work for me in the latest version of Microsoft Visual Studio Ultimate 2013 version 12.0.21005.1

Receive the following validation warning: The 'ng-app' attribute is not a valid attribute of the 'html' element.
The 'ng-view' attribute is not a valid attribute of the 'div' element.

Am I missing an xsd link somewhere?

+52
angularjs visual-studio-2013
Oct. 31 '13 at 14:43
source share
12 answers

I had the same problem and I did the following and it helped.

If you use ReSharper, you can add an extension that Intellisense will give you and will not trigger a warning.

Top menu in VS> Resharper> Extension Manager> AngularJS Search This will add angular js intellisense.

------- ------- EDIT

Using Resharper 8.2.1 Resharper menu

enter image description here

+65
Feb 15 '14 at 23:32
source share

I know this is old, but it was still happening for me. To fix this 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 closing tag </xsd:attributeGroup> insert 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 run VS2013 again. This should solve the problem.

+20
Jun 25 '14 at 21:59
source share

I installed http://vswebessentials.com/

created a file called _reference.js with the contents

 /// <autosync enabled="true" /> /// <reference path="angular.js" /> /// <reference path="underscore.js" /> 

I found out from The Story Behind _references.js

+17
Jul 30 '14 at 18:08
source share

If you are using ReSharper, try disabling ReSharper IntelliSense for HTML.

ReSharper> Options> IntelliSense> General> Restricted ReSharper IntelliSense

Notes:

  • It does not provide Intellisense from AngularJS in ASP.NET files.
  • You need to re-open the HTML files in VS after changing the settings
  • The current version of ReSharper is 8.2
+9
Nov 08 '13 at
source share

You can also run this from the package manager console in VS 2013: Install-Package AngularJS.Intellisense.

+9
Mar 06 '15 at 22:51
source share

Try marking Text Editor\HTML\General\Auto list members in the options.

+5
Nov 10 '13 at
source share

Visual Studio 2013 Update 4 removes the validation, however it does not include IntelliSense for AngularJS.

Support for custom elements, polymer elements, and attributes

We no longer check unknown attributes for custom elements, as there will be many special tags in different frames. So they will no longer curl under unknown elements.

- Announcement of new web features in Visual Studio 2013 Update 4 RC

Download Visual Studio 2013 Update 4 .

Validation is removed only in the HTML editor, and not in the HTML editor (Web Forms). This means that by default .html files will not have element checks, but .aspx pages will be displayed. If, like me, you don’t think it makes sense, show your support by voting for custom elements in .aspx files .

+2
Oct 23 '14 at 18:46
source share

Running the same problem. If you have ReSharper installed on VS 2013 , like me, you can get instellisense by installing the AngularJS plugin (provided by JetBrains).

Here's how to do it:

  • VS2013> ReSharper> Extension Management.
  • Search for "AngularJS" using Nuget online, then click "Install."

The above should give you what you need. If you need a graphic guide, here is the link - http://jeeshenlee.com/2014/07/12/how-to-get-angularjs-intellisense-support-on-resharper/

+1
Jul 12 '14 at 1:55
source share

I know this post is old and the question is specific to VS 2013, however, if you are still using VS 2010 and want to apply the puargs solution, you can find the file in C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Common7 \ Packages \ schemas \ html \ html_5.xsd.

You need to add the puargs code in the <xsd:attributeGroup name="commonHTML5coreAttributeGroup"> .

Mads Kristensen also discusses [applying this solution for VS 2012] 1 and provides a link to the updated 2012 version of commonHTML5Types.xsd in step 2.

Also note that in both puargs and Mads files there is no ng-view attribute that calls the attribute name followed by an equal sign (=). Full element: <xsd:attribute name="ng-view" vs:category="Angular" vs:standalone="true" /> .

+1
Aug 07 '14 at 1:03
source share

I have not tried vs2013 but could work. Work with vs2012. http://madskristensen.net/post/angularjs-intellisense-in-visual-studio-2012

0
Nov 23 '13 at 20:27
source share

I just turned off intellisense redirect for HTML pages and got angular intellisense on VS2013

0
Dec 21 '13 at 4:05
source share
0
Mar 27 '14 at 15:54
source share



All Articles