-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Elements inside of an if binding have the values of their bindings destroyed after being recreated in the DOM #207
Comments
Give a look at this example too... http://plnkr.co/edit/OpNfWu?p=preview
|
closing this- @niieani's originally reported issue is not a supported binding/custom-element scenario. The custom element attempts to access a property that doesn't exist on the @danfma here's a current aurelia plunker if you want to re-test your issue against the latest version: http://plnkr.co/edit/i52DPO?p=preview @niieani let me know if you have any questions on this- or head over to the main gitter. |
@jdanyow Thanks for digging into this. |
@niieani I think when you update to the latest version of Aurelia (released this week) you'll find that the |
@jdanyow I see, the Plunker: http://plnkr.co/edit/69hgop |
you're close- check out this http://stackoverflow.com/a/32781324/725866 |
Inside of a custom element I have a
@bindable
property that is an instance of a specific object. Initially, it works correctly, but if I wrap an instance of that element in anif.bind
and toggle the return value of theif.bind
off and on, the object reappears, but its binding is now "handicapped", i.e. it no longer holds the object's instance, but a generic Object (without any arrays or methods).Demo plunker: http://embed.plnkr.co/LPyYr0/preview
Steps to reproduce:
data
is no longer an object instanceofComponentData
but a commonObject
. i.e. it is no longer possible to invoke the method on it to create more nested objects.The workaround is to use the lighter
show
binding instead of theif
.@jdanyow initially suggested it might be related to #205.
See also the Gitter discussion
The text was updated successfully, but these errors were encountered: