Skip to content

Request for snippet to do two way databinding  #102

Description

@pradt

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;

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions