February 2019
Intermediate to advanced
446 pages
10h 55m
English
In AppModule, AppComponent is assigned to bootstrap metadata. Therefore, there will be at least a single component in every Angular app. We call this the root component. Look at the AppComponent (src/app.component.ts) code, which is as follows:
import { Component } from '@angular/core';@Component({ selector: 'mmj-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss']})export class AppComponent { title = 'Chapter8';}
Angular components are defined using a decorator (@Component) that's marked on a class (AppComponent). The component is associated with an HTML template. This HTML template (the view) is rendered using contained application data and logic. The @Component decorator function also contains metadata ...
Read now
Unlock full access