Reputation: 4524
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:
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
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