Closed tarangsachdev92 closed 4 years ago
I tried and able to get row_data from the component its self so no need to do that.
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-my-component-name',
templateUrl: './my-component-name.component.html',
styleUrls: ['./my-component-name.component.scss']
})
export class MyComponentNameComponent implements OnInit {
@Input() value: any;
@Input() cell_value: any;
@Input() row_data: any;
constructor() { }
ngOnInit() {
console.log(this.cell_value);
console.log(this.row_data);
}
}
I want to pass data to the custom component,
onComponentInit: (component) => { component.value = component.row_data }
but not it is undefined.