2016-05-03 08:06:32 -04:00
|
|
|
import { HeroDetailComponent } from './hero-detail.component';
|
|
|
|
import { HeroesService } from './heroes.service';
|
|
|
|
import { upgradeAdapter } from './upgrade_adapter';
|
2015-12-31 01:46:32 -05:00
|
|
|
|
2016-06-07 19:06:25 -04:00
|
|
|
declare var angular: any;
|
2015-12-31 01:46:32 -05:00
|
|
|
|
|
|
|
// #docregion register
|
|
|
|
angular.module('heroApp', [])
|
|
|
|
.service('heroes', HeroesService)
|
2016-05-28 10:17:21 -04:00
|
|
|
.directive('heroDetail',
|
|
|
|
upgradeAdapter.downgradeNg2Component(HeroDetailComponent));
|
2015-12-31 01:46:32 -05:00
|
|
|
|
|
|
|
upgradeAdapter.upgradeNg1Provider('heroes');
|
|
|
|
|
|
|
|
// #enddocregion register
|
|
|
|
|
|
|
|
upgradeAdapter.bootstrap(
|
|
|
|
document.querySelector('hero-app'),
|
|
|
|
['heroApp'],
|
|
|
|
{strictDi: true}
|
|
|
|
);
|