2015-12-31 08:46:32 +02:00
|
|
|
// #docregion
|
2016-05-03 14:06:32 +02:00
|
|
|
import { Component } from '@angular/core';
|
|
|
|
import { upgradeAdapter } from './upgrade_adapter';
|
2016-05-22 14:30:15 +01:00
|
|
|
import { Hero } from '../hero';
|
2015-12-31 08:46:32 +02:00
|
|
|
|
|
|
|
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
|
|
|
}
|