we have taken a component to Show Event Binding .
See My VDO on Shubh Techno Expert
https://youtu.be/2LDYq7uKhzE
sidebar.component.html
Interpollation
sidebar.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-sidebar',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.component.css']
})
export class SidebarComponent {
myEmail:any;
constructor() { }
ngOnInit() { }
onClickSubmit(data) {
debugger
this.myEmail = data.emailid;
alert("Entered Email id : " + data.emailid +" " + data.passwd);
}
btnClicked()
{
console.log('i am clicked from HTML Page');
}
btnClickedwithParamter(evnt)
{
console.log('Button is clicked which Will return Click Event value') ;
console.log(evnt) ;
}
}
No comments:
Post a Comment