https://github.com/angular/angular
Raw File
Tip revision: 93cc5b221007165951b53d6ffbc1a49b20f38003 authored by Jessica Janiuk on 12 October 2022, 18:36:37 UTC
release: cut the v15.0.0-next.6 release
Tip revision: 93cc5b2
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