https://github.com/angular/angular
Raw File
Tip revision: 167e2a8bb8b5aca8d83db0615e91c90355cd4c90 authored by Alex Rickabaugh on 03 November 2021, 17:44:19 UTC
release: cut the v13.0.0 release (#44032)
Tip revision: 167e2a8
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