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
ref binding to child object causes unbind failure #372
Comments
I believe this has already been fixed. Run |
Yeah, maybe not so much. I updated prior to posting this and again just now. Doesn't work over here. I will say that the parent object is transitive and part of the dependency tree itself. I suspect that may not be supported.
|
We will need a repro to see the actual problem so we can fix it. |
I don't think computedFrom supports property paths until after the upcoming release is out. So, there may be a problem with your decorator as well. |
Ugh. My bad. I was confusing the computedFrom issue with this other issue, but thanks for reporting status on that too. I need to get more sleep. The unbinding issue continues to be a problem after updating. |
Can you provide us with a simple reproduction. I imagine @jdanyow could fix this pretty easily if we had this. |
Thanks. Let me see what I can do with the navigation skeleton app to repro. |
This exhibits the behavior. Just click the 'Next View' button, which will load a new child view. Every other view instantiation will throw the exception. |
Thanks @snortblt, I've distilled your sample down to this: Looks like we need to move these lines to the end of the view's unbind method. |
Using the ref binding to a child object of a vm property as shown works until the view is destroyed.
`
${option.text}
When the view is being unbound, the context object in the following snippet from aurelia-binding.js (beta 1.2.2) is null.
AccessScope.prototype.evaluate = function evaluate(scope, lookupFunctions) { var context = getContextFor(this.name, scope, this.ancestor); return context[this.name]; };
The text was updated successfully, but these errors were encountered: