17 lines
321 B
TypeScript
17 lines
321 B
TypeScript
|
// #docregion
|
||
|
// #docregion
|
||
|
import { Component } from '@angular/core';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'my-app',
|
||
|
templateUrl: 'app.component.html'
|
||
|
})
|
||
|
export class AppComponent {
|
||
|
showHeading = true;
|
||
|
heroes = ['Magneta', 'Bombasto', 'Magma', 'Tornado'];
|
||
|
|
||
|
toggleHeading() {
|
||
|
this.showHeading = !this.showHeading;
|
||
|
}
|
||
|
}
|