- Learning Angular for .NET Developers
- Rajesh Gunasundaram
- 44字
- 2021-07-02 20:58:52
Inline templates
An inline template is used when there is a need to render very simple content, such as a one-liner, for example. In such cases, inline views or templates will be defined directly in the annotation:
@Component({
selector: 'first-component',
template: "<div>{{getGreetingPhrase()}} {{name}}</div>"
})