Request for snippet to do two way databinding
Opened this issue · 0 comments
pradt commented
Hi,
I just went through the painful processes of setting up a custom data binding for number of properties. It would be great if you could include snipet for two way data binding for typescript using getters/setters :
public _Name:string = "";
@Output() NameChange:EventEmitter<string> = new EventEmitter<string>();
@Input()
set Name(value:string)
{
console.log("yeah")
this._Name = value;
this.NameChange.emit(value);
}
get Name():string
{
return this._Name;
}