Reputation: 712
I'm building an app using ASP.NET 5 & AngularJS in TypeScript in Visual Studio 2015. However, even after installing the AngularJS Core & DefinitelyTyped TS references for AngularJS via NuGet, I still don't get IntelliSense for the AngularJS libraries.
I'm also using the ReSharper 9.1 AngularJS extension, which gives me IntelliSense in HTML files but not in my TypeScript code.
I've also noticed that even though the references to AngularJS and the definition files are present, the files themselves are nowhere to be found in my solution. Does anybody know how to fix this?
Edit: I have found the solution. Read my answer if you're having the same problem.
Upvotes: 5
Views: 10688
Reputation: 712
I have found a solution to my problem using the DefinitelyTyped Definition Manager: http://definitelytyped.org/tsd/
I've installed tsd globally using NPM:
npm install -g tsd
then using a command prompt in the root folder of my solution, I've installed the AngularJS type definitions by entering the following command:
tsd install angular
It automatically downloaded the type definitions into a folder named "typings/angularjs" and IntelliSense started working as intended.
I can also confirm that using this approach, no NuGet packages of AngularJS Core or the DefinitelyTyped definitions are needed and ReSharper does not block IntelliSense.
UPDATE:
It seems like TSD is about to be deprecated and replaced by the typings project. It integrates well with TSD as well and has specific options for TSD users. While TSD still works fine, keep in mind that in the future TSD might not be maintained anymore.
Upvotes: 3
Reputation: 10172
There's an add-on for the AngularJS Intellisense:
PM> Install-Package AngularJS.Intellisense
https://www.nuget.org/packages/AngularJS.Intellisense/
There's also a known issue with Resharper blocking JS intellisense. Turn it off and see if it makes any difference.
Upvotes: 5