Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Simple task like adding a new module #187

Closed
jvelezc opened this issue Jul 15, 2016 · 2 comments
Closed

Simple task like adding a new module #187

jvelezc opened this issue Jul 15, 2016 · 2 comments

Comments

@jvelezc
Copy link

jvelezc commented Jul 15, 2016

npm install angular --save-dev
then i just try to add
import angular from 'angular'

I get cannot find module 'angular'

What is the procedure to register angular or any other module so that it is discoverable?

@SteveSandersonMS
Copy link
Member

This sounds more like an Angular question, so you might want to follow up with them. But my guess is that, if you're using Angular 1 which doesn't include TypeScript support by default (which Angular 2 does), then you'll need to get hold of some suitable .d.ts files for the Angular 1 libraries.

This looks like a reasonable guide: https://coderwall.com/p/qsrzyq/getting-started-with-typescript-angular

@jvelezc
Copy link
Author

jvelezc commented Jul 19, 2016

You are right I have to add typings d.ts files and then Visual Studio stopped complaining. I guess Angular2 being better tricked me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants