Answers for "angular passing data to child component"

1

angular passing data to child component

Parent component:
<app-child-component [item]="data"></app-child-component>

Child component.ts
import { Component, Input } from '@angular/core'; // First, import Input
export class ItemDetailComponent {
  @Input() item = ''; // decorate the property with @Input()
}
Posted by: Guest on August-18-2021

Code answers related to "angular passing data to child component"

Code answers related to "Javascript"

Browse Popular Code Answers by Language