Tiberiu Popescu
Tiberiu Popescu

Reputation: 4524

Visual Studio 2013 with Angular2 and Typescript

I'm using the angular2 QUICKSTART and I have a problem where Visual Studio don't recognize Angular2 with typescript import Modules, in rest all it's fine:

enter image description here

It says:

Cannot find module 'angular2/platform/browser'

My app :

I know that typescript should read .d.ts file directly from node_modules --> angular2, but anyway I tried to add angular2 DefinitelyTyped and still not worked.

Atm I use VS 2013 update 5 with typescript 1.5 installed (I also tried with 1.75)

Upvotes: 6

Views: 4298

Answers (2)

Hrishikesh T T
Hrishikesh T T

Reputation: 339

Please right click on the visual studio project and click on the Properties option, Then select Typescript Build,default 'none' is selected, change it to 'CommonJs'.

If again any problem regarding 'experimentalDecorators' persists unload the project and add <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>statement inside the PropertyGroup tag.

Again problem exists on building the project such as 'could not find the name Map', 'could not find the name Promise', or 'could not find the name Set' try to change the target to 'es6' in the tsconfig.json

Upvotes: 0

Tiberiu Popescu
Tiberiu Popescu

Reputation: 4524

Solved by using Visual Studio 2015.

Upvotes: -3

Related Questions