Visual Studio Code: Cannot Find Name Angular?
I have an Angular App and it works fine, but my debugger is showing me 'Cannot find name angular'. var table = angular.module('myTable', ['angularUtils.directives.dirPagination'])
Solution 1:
Click on the lightbulb that will be next to 'angular' and then choose 'download typings'.
Solution 2:
I was having the same issue until I ran across this article:
Basically, here's what you have to do with npm:
cd (app path)
npm install -g tsd
tsd init
tsd query angular --action install --save
That's it. When you restart VS Code your problem should be gone.
Note that I didn't use any of the ///reference links as the author suggested in the article, but after the above steps I stopped getting that message about angular not being found and I have already noticed more ng-* options coming through in Intellisense.
Post a Comment for "Visual Studio Code: Cannot Find Name Angular?"