July 2017
Intermediate to advanced
454 pages
10h 1m
English
We discussed including templates in different ways in our component. Let's learn how to define our template inside the component.
The syntax for using templates inside the component decorator is as follows:
import {Component, View} from "@angular/core";@Component({ selector: 'my-app', template: `<h2> {{ title }} </h2>`})export class MyTemplate { title = 'Learning Angular!!!'}
The most important things to note in the preceding code snippet are as follows:
Read now
Unlock full access