@Component({
selector: 'hero-detail',
template: `
<p *ngIf="hero">
1 2 3 4 5 6 |
|
</p>
`
})
What is the selector used for?
typecho2017-06-13 09:24:51
selector
is the container of
template
The selector
here is hero-detail
, then the following template
will be displayed in a container like <hero-detail></hero-detail>