我正在尝试按照本指南https://angular.io/docs/ts/latest/guide/ngmodule.html引导我的Angular 2 RC5应用程序. 下面是我的代码
import { AppModuleNgFactory } from './app.module.ngfactory';
import {platformBrowser} from "@angular/platform-browser";
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试编译打字稿代码时,我收到以下错误
app\main.ts(1,36):错误TS2307:找不到模块'./app.module.ngfactory'.
如何生成app.module.ngfactory文件?我应该使用哪种工具?
有没有办法使用角度cli的AOT?
我已经安装了模块(@ angular/compiler @ angular/compiler-cli),当我输入ngc -p scr时,它会创建ngFactory.ts文件并将其编译为dist/tsc-out(tsconfig中的angular cli默认值)
不知道如何从这里开始:)
干杯
韩