The template or templateUrl is your view. Here you can write HTML markup. Using the template keyword, in our object literal, means we get to define the HTML markup in the same file as the component class. Were we to use templateUrl, we would then place our HTML markup in a separate file.
The preceding example also lists the following double curly braces, in the markup:
<h1>{{ title }}</h1>
This will be treated as an interpolation and the expression will be replaced with the value of AppComponent's title field. The component, when rendered, will therefore look like this:
hello app