I've managed to get intellisense for the ng- directives in the HTML. I also get intellisense for most javascript files. However, I have no idea how to get intellisense for bits that are injected. Consider the following:
function mandatsCtrl($scope, Domiciliation, logger, $q) {
}
how to I get intellisense for $q or $scope, which are injected ?
-
3you may wanna check this out [visual studio 2013 angularjs intellisense support][1] [1]: stackoverflow.com/questions/19709538/…omid.n– omid.n2014年01月25日 03:54:54 +00:00Commented Jan 25, 2014 at 3:54
-
how did you get intellisense for ng-directives in the HTML. can you let me know please?mnu-nasir– mnu-nasir2016年05月08日 13:55:40 +00:00Commented May 8, 2016 at 13:55
4 Answers 4
I created a javascript file that you can reference that gives (nearly) complete AngularJS intellisense in JavaScript files, including on your custom factories, services and so forth.
https://github.com/jmbledsoe/angularjs-visualstudio-intellisense
Comments
As far as I know you can't do nothing like that. But if you are using ReSharper you can try AngularJS support for ReSharper plugin. It's in the early stage so I guess we can expect a lot more over time.
Here's another link for HTML5Schema (all the ng-* attributes available in Intellisense). I guess you already have that.
There is also a Chrome plugin AngularJS Batarang. Extends the Developer Tools, adding tools for debugging and profiling AngularJS applications.
I'm looking forward to other answers.
You can get intellisense on injected parameters (and just about everything else) if you use TypeScript. TypeScript let's you specify the type of your parameters so VS will know how to use them.
eg.
/// <reference path="./angular.d.ts" />
function mandatsCtrl($scope: ng.IScope) {...}
5 Comments
Have you taken a look at this: https://github.com/matijagrcic/AngularJS-Intellisense-For-Visual-Studio
I have got Intellisense for $scope and $q through one of the extensions I have (think it must be 'Web Essentials 2012'), although it doesn't seem to be particularly intelligent Intellisense - it's just suggestions of every single possible JS method/property.