Skip to content
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

Support one-way bindings to models #6

Closed
tbuschto opened this issue Mar 30, 2018 · 1 comment
Closed

Support one-way bindings to models #6

tbuschto opened this issue Mar 30, 2018 · 1 comment

Comments

@tbuschto
Copy link
Member

Current draft:

Model:

class MyModel {
  @event public readonly onMyValueChanged: ChangeListeners<string>;
  @property public myValue: string;
}

Component:

class MyComponent {

  @property public myModel: MyModel;

  constructor() {
    super();
    this.append(
      <textView bind-text='myModel.myValue'/>
    );
  }

}
@tbuschto
Copy link
Member Author

Binding to a property of a plain object works as of commit 806658c, but no change detection yet.

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

No branches or pull requests

1 participant