I'm going through the Angular tutorial and can see the usefulness of having a component with more than one template. e.g. here's a component with a 'full' and 'min' template
import { Component, Input} from '@angular/core'
import { Hero } from './hero'
@Component({
selector: 'my-hero-detail',
template: `
<div *ngIf="hero">
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input [(ngModel)]="hero.name" placeholder="name"/>
</div>
</div>
`
})
@Component({
selector: 'my-hero-detail-min',
template: `
<div *ngIf="hero">
</label>{{hero.id}}</label>
</div>
`
})
export class HeroDetailComponent {
@Input()
hero: Hero;
}
Needless to say, it doesn't work: how can I make it work?