https://github.com/angular/angular
Raw File
Tip revision: a2ce1da85baa513b096ca7c06400b641663b1635 authored by Jessica Janiuk on 27 October 2021, 18:29:30 UTC
release: cut the v13.0.0-rc.2 release (#43968)
Tip revision: a2ce1da
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