Skip to content

Request for snippet to do two way databinding #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pradt opened this issue Mar 28, 2019 · 0 comments
Open

Request for snippet to do two way databinding #102

pradt opened this issue Mar 28, 2019 · 0 comments

Comments

@pradt
Copy link

pradt commented Mar 28, 2019

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;

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant