https://github.com/angular/angular
Raw File
Tip revision: a491295d9e099c05ec26bee8b694cda688e44b33 authored by Andrew Scott on 04 August 2021, 16:59:03 UTC
release: cut the v12.1.5 release (#43044)
Tip revision: a491295
app.component.ts
import { Component } from '@angular/core';

import { Hero, heroes } from './hero';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ]
})
export class AppComponent {
  heroes = heroes;
  hero: Hero | null = this.heroes[0];
  // #docregion condition
  condition = false;
  // #enddocregion condition
  logs: string[] = [];
  showSad = true;
  status = 'ready';

  trackById(index: number, hero: Hero): number { return hero.id; }
}
back to top