Answers for "in angular, you can pass data from the parent component to the child component by using"

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 "in angular, you can pass data from the parent component to the child component by using"

Code answers related to "Javascript"

Browse Popular Code Answers by Language