angular taking input code example
Example 1: onclick event in angular
(click)="myClickFunction($event)"
Example 2: how to make input in angular optional
export class ChildComponent {
@Input() showName?: boolean;
constructor() { }
}
(click)="myClickFunction($event)"
export class ChildComponent {
@Input() showName?: boolean;
constructor() { }
}