April 2017
Beginner to intermediate
378 pages
7h 57m
English
Templates are used to bind the component logic to the HTML. Templates are also used as an interface between the user interaction of the user and app logic.
Templates have changed quite a bit when compared to version 1 of Angular. But there are a few things that still remain the same. For instance, the way we take a value from a component and display it in the user interface remains the same with the double curly brace notation (interpolation syntax).
The following is a sample app.component.ts:
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { // This is where we write the component logic! title = 'Hello World!'; }
The app.component.html ...
Read now
Unlock full access