Cannot find external module 'angular2/angular2' - Angular2 w/ Typescript

前端 未结 10 1464
臣服心动
臣服心动 2020-12-01 21:20

I am going through the step by step tutorial on angular.io (Angular 2). I am using typescript. I get the following error when trying to compile:

Cannot find ex

10条回答
  •  醉酒成梦
    2020-12-01 21:42

    checkout my sample MVC5 + Angular2 (Beta1 & TypeScript) VS2015 solution: https://github.com/hobe/angular2mvc5

    Basic steps:

    1. TypeScriptModuleKind must be set to CommonJS
    2. TypeScriptEmitDecoratorMetadata and TypeScriptExperimentalDecorators must be set in your .csproj file

    Also requires "TypeScript 1.7.6.0 for Visual Studio 2015 Update 1"

提交回复
热议问题