2015-12-31 08:46:32 +02:00
|
|
|
// #docregion
|
2016-04-27 11:28:22 -07:00
|
|
|
import {Component} from '@angular/core';
|
2015-12-31 08:46:32 +02:00
|
|
|
import {upgradeAdapter} from './upgrade_adapter';
|
|
|
|
import {Hero} from '../Hero';
|
|
|
|
|
|
|
|
const HeroDetail = upgradeAdapter.upgradeNg1Component('heroDetail');
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-container',
|
|
|
|
template: `
|
|
|
|
<hero-detail [hero]="hero">
|
|
|
|
<!-- Everything here will get transcluded -->
|
|
|
|
<p>{{hero.description}}</p>
|
|
|
|
</hero-detail>
|
|
|
|
`,
|
|
|
|
directives: [HeroDetail]
|
|
|
|
})
|
|
|
|
export class ContainerComponent {
|
2016-04-11 15:36:53 +03:00
|
|
|
hero = new Hero(1, 'Windstorm', 'Specific powers of controlling winds');
|
2015-12-31 08:46:32 +02:00
|
|
|
}
|