Interpolation is a technique that allow the user to bind a value to a UI element . two curly braces are used for this {{}} . It is called a Template Expression
Email ID
ngModel width="100%">
See my VDO on Shubh Techno Expert Channel
app.component.html
Interpollation
{{userlogin1.value.emailid}}
This is incremented Value : {{1+ 1}}
Sum of :
sum of : {{10 + 20 + 30}}
{{userlogin1.value.emailid}}
{{'This is My Email id ' + userlogin1.value.emailid}}
app.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class appComponent {
myEmail:any;
constructor() { }
ngOnInit() { }
onClickSubmit(data) {
debugger
this.myEmail = data.emailid;
alert("Entered Email id : " + data.emailid +" " + data.passwd);
}
}
No comments:
Post a Comment