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

Observe non direct properties #7

Closed
matjaz opened this issue Sep 10, 2015 · 1 comment
Closed

Observe non direct properties #7

matjaz opened this issue Sep 10, 2015 · 1 comment

Comments

@matjaz
Copy link
Contributor

matjaz commented Sep 10, 2015

For example

class VM {
  get isValid() {
    // var fullName = this.user.fullName
    return this.user.isValid();
  }
}
class User {
  isValid() {
    return this.fullName.length > 0;
  }
}

isValid is not updated. But if we uncomment var fullName it is.

I suggest adding something like

@computedFrom('user.fullName')
get isValid() {
  return this.user.isValid();
}
@jdanyow
Copy link
Owner

jdanyow commented Feb 27, 2016

tracking this one here: aurelia/binding#149

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

2 participants