2016-05-03 08:06:32 -04:00
|
|
|
|
import { MainController } from './main.controller';
|
2015-12-31 01:46:32 -05:00
|
|
|
|
// #docregion downgradecomponent
|
2016-05-03 08:06:32 -04:00
|
|
|
|
import { HeroDetailComponent } from './hero-detail.component';
|
2015-12-31 01:46:32 -05:00
|
|
|
|
|
|
|
|
|
// #enddocregion downgradecomponent
|
2016-05-03 08:06:32 -04:00
|
|
|
|
import { UpgradeAdapter } from '@angular/upgrade';
|
2015-12-31 01:46:32 -05:00
|
|
|
|
|
|
|
|
|
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
|