Answers for "data communication via @input"

0

data communication via @input

content_copy
      
      import { Component } from '@angular/core';

import { HEROES } from './hero';

@Component({
  selector: 'app-hero-parent',
  template: `
    <h2>{{master}} controls {{heroes.length}} heroes</h2>
    <app-hero-child *ngFor="let hero of heroes"
      [hero]="hero"
      [master]="master">
    </app-hero-child>
  `
})
export class HeroParentComponent {
  heroes = HEROES;
  master = 'Master';
}
Posted by: Guest on May-17-2021

Code answers related to "data communication via @input"

Browse Popular Code Answers by Language