Setting up AngularJS for TypeScript in Sublime Text 3

user3414321

Good day, I am trying to use AngularJS in TypeScript, problem is, i have just shifted to Sublime Text 3 from VS2013, for some OS reason, I have dug around google for answers, but i haven't found one. so I'd like to know how i could setup AngularJS for TypeScript in Sublime (note: TypeScript is already configured in Sublime; I'm looking specifically for how to set up AngularJS for TypeScript). thanks.

Caio Cunha

Not sure if I got your question, but pretty much, after installing the plugin you need to install AngularJs TypeScript Definitions and reference them in your code.

For definition management I use tsd. It's pretty much like bower (oh God... one more dependency manager...). You can install it using npm install tsd -g, then, in your project folder initialize tsd repo

tsd init

And install AngularJs Definitions

tsd query angular --action install --save

And finally reference them in your source code by adding the reference directive (tsd will install each definition separately, and tsd.d.ts consolidates all installed dependencies, so you don't need to bloat your files with references):

/// <reference path="typings/tsd.d.ts" />

And that's it. You should be able to get code hint now:

AngularJs typescript code hint

Now, did you do all this and still don't get it working?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related