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