angular-cn/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/main-aot.ts

12 lines
468 B
TypeScript
Raw Normal View History

2016-11-14 12:07:39 -05:00
// #docregion bootstrap
import { platformBrowser } from '@angular/platform-browser';
import { UpgradeModule } from '@angular/upgrade/static';
import { AppModuleNgFactory } from '../aot/app/app.module.ngfactory';
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory).then(platformRef => {
2016-11-14 14:02:54 -05:00
const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
2016-11-14 12:07:39 -05:00
upgrade.bootstrap(document.documentElement, ['phonecatApp']);
});
// #enddocregion bootstrap