2. Create a home component
In this section we will add a Home page component and configure an associated route.
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
title: string = 'The title';
constructor() {}
ngOnInit() {}
updateTitle(value) {
console.log(`updateTitle: ${value}`);
this.title = value;
}
}1. Add a Home page component
2. Add a HomeComponent route
3. Explore template event and data binding
StackBlitz Link
Last updated