src/app/header/header.component.ts
Component that displays the name of the app in a banner at the top
selector | app-header |
styleUrls | header.component.css |
templateUrl | ./header.component.html |
appName |
appName: |
Default value : Bob's Bookstore
|
Defined in src/app/header/header.component.ts:15
|
Name of the app |
import { Component } from '@angular/core';
/**
* Component that displays the name of the app in a banner at the top
*/
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.css']
})
export class HeaderComponent {
/**
* Name of the app
*/
appName = "Bob's Bookstore";
}
<header class="page-header text-center">
<h1>{{appName}}</h1>
</header>