angular-cn/public/docs/_examples/upgrade-adapter/ts/app/downgrade-io/app.module.ts

24 lines
649 B
TypeScript
Raw Normal View History

import { MainController } from './main.controller';
// #docregion downgradecomponent
import { HeroDetailComponent } from './hero-detail.component';
// #enddocregion downgradecomponent
import { UpgradeAdapter } from '@angular/upgrade';
const upgradeAdapter = new UpgradeAdapter();
// #docregion downgradecomponent
angular.module('heroApp', [])
.controller('MainController', MainController)
.directive('heroDetail', upgradeAdapter.downgradeNg2Component(HeroDetailComponent));
// #enddocregion downgradecomponent
upgradeAdapter.bootstrap(
document.querySelector('hero-app'),
['heroApp'],
{strictDi: true}
);
// #enddocregion bootstrap