Angular 19 Tutorial in Hindi #9 Function call on Button Click
Make button.
Define a function.
Call function on button click.
Call function from other function
Interview Questions
<h1>Function call on Button Click</h1>
<button (click)="handleClickEvent()" >Click Me</button>
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
imports: [],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
handleClickEvent() {
console.log("function called");
this.otherFunction()
}
otherFunction(){
console.log("other function");
}
}