Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Pay close attention to line 1 - selectedHero matches property at line 13.

Child Component

Code Block
languagejs
titlehero-detail.component.ts
linenumberstrue
import { Component, OnInit, Input } from '@angular/core';
import { Hero } from '../hero'

@Component({
  selector: 'app-hero-detail',
  templateUrl: './hero-detail.component.html',
  styleUrls: ['./hero-detail.component.css']
})
export class HeroDetailComponent implements OnInit 
{
  @Input()
  pickedHero: Hero;

  constructor() { }

  ngOnInit() {
  }

}