5
votes

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.

2
Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on Stack Overflow. For more details see Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?Bacteria
@Pitchers The ironic thing is that by removing that line from the original post and adding your comment, you've actually increased the original post's size by a tiny bit. The rule is there to avoid that.... ironyyyyyyy. A bit counter-productive.B.K.

2 Answers

5
votes

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.

3
votes

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.