I am working with a parent-child component setup. In the child component (child.component.ts), there is a method called "childFunction()". Now, I need to call this method from within a function in the parent component. Can you guide me on how to achieve this?
**Parent.html :**
<div class="box">
<input type="text" (input)="searchValue=$event.target.value" placeholder={{placeHolder}} />
<btn-icon [searchType]='searchType' [searchText]='searchValue'></btn-icon> // child component
</div>
**parent.component.ts :**
export class parentComponent implements OnInit {
parentFunction(){
// **Call** childFunction('inputValue');
}
**btn-icon is Child :**
**btn-icon.component.ts: (Child)**
export class btn-iconimplements OnInit {
@Input() Type: string;
@Input() Text: string;
childFunction(inputValue){
//some logic
}
}