https://github.com/angular/angular
Raw File
Tip revision: d8226de64723a6786878bd0ffd976484613fdb5b authored by Dylan Hunn on 20 April 2022, 21:46:22 UTC
release: cut the v14.0.0-next.14 release (#45704)
Tip revision: d8226de
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