https://github.com/angular/angular
Raw File
Tip revision: b79ad226b2c6fc2dfaafe992facd7172fa0944c3 authored by Jessica Janiuk on 16 November 2022, 17:26:19 UTC
release: cut the v15.0.0 release
Tip revision: b79ad22
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