Closed dylanparry closed 9 years ago
You definitely need to inform Visual Studio of the JavaScript files that your code references. You can do this by adding reference comments to the top of each file or by creating and maintaining the /Scripts/_references.js file (which is preferable). I do believe that the order of these references is also important, much like the order of script elements in an HTML page. This importance particularly comes up regarding configuration blocks and referencing providers declared in the same module that you're working on. Make sure your _references.js file is in order first of all. You could also see if you get Intellisense in the sample project.
Along with the reference to angular.js, you'll also need angular-route.js to use the routing feature. $routeProvider is not defined in angular.js, so if you're missing a reference to the routing library, you won't see IntelliSense.
Thanks all. I'll give your suggestions a go. Looks like my _references.js isn't set up properly and appears to have listed all the minimised versions of the libraries too.
On Fri, Feb 6, 2015 at 9:04 AM -0800, "Jordan Matthiesen" notifications@github.com wrote: Along with the reference to angular.js, you'll also need angular-route.js to use the routing feature. $routeProvider is not defined in angular.js, so if you're missing a reference to the routing library, you won't see IntelliSense.
Reply to this email directly or view it on GitHub: https://github.com/jmbledsoe/angularjs-visualstudio-intellisense/issues/17#issuecomment-73272475
Hi, I just ran into the same problem which was solved by creating a _references.js file. Reading Mads' article and this one helped me to solve it. It would be super-useful to add something into the README of this project as the current instructions are a misleading if you've never come across _references.js before.
But I don't want to sound too critical here. Thanks so much for the great tool - I'm loving the Angular Intellisense now it's working. Cheers!
That's a good idea. I'm certainly open to pull requests on the README if the steps you took are fresh in your mind. Otherwise I'll try to write something up at some point, but can't guarantee when.
John
On Fri, Mar 13, 2015 at 2:16 PM, Charles Roper notifications@github.com wrote:
Hi, I just ran into the same problem which was solved by creating a _references.js file. Reading Mads' article http://madskristensen.net/post/the-story-behind-_referencesjs and this one http://blogs.msdn.com/b/webdev/archive/2014/10/10/references-js-file-s-auto-sync-feature.aspx helped me to solve it. It would be super-useful to add something into the README of this project as the current instructions http://blogs.msdn.com/b/webdev/archive/2014/10/10/references-js-file-s-auto-sync-feature.aspx are a misleading if you've never come across _references.js before.
But I don't want to sound too critical here. Thanks so much for the great tool - I'm loving the Angular Intellisense now it's working. Cheers!
— Reply to this email directly or view it on GitHub https://github.com/jmbledsoe/angularjs-visualstudio-intellisense/issues/17#issuecomment-79210326 .
Hi,
I’ve downloaded the intellisense file and installed it globally in the references directory, but I’m not getting any intellisense for Angular at all. Even typing just "angular." into the JS editor just brings up the intellisense dialog filled with exclamation marks, so it doesn’t appear to be loading any real stuff at all.
If I drag and drop the angular.js file into the editor so I get a reference at the top, then intellisense starts working when I type "angular." but it’s not working for other things such as "$routeProvider.", again I just get a list full of exclamation marks.
Do I have to do anything else to get it to load, other than putting it in the references folder?
Thanks,