Open EmergentBehavior opened 10 years ago
I actually found a workaround here: https://www.youtube.com/watch?v=aFZ-b3pEK_Y
Basically, instead of using raw handlebars conditionals, you create animated-if
and animated-unless
components that can toggle visibility.
Yeah, what happens is that if a view/component is nested in any way inside another element, it gets destroyed immediately :/ this is also an issue with the {{#each}}
helper. Haven't been able to solve it yet, so in the meantime I would use that workaround.
I currently have a component, let's call it
some-component
. I also have a template with logic similar to this:I have the following animation methods defined on the component:
The animation in works fine, but the animation out does not. I tried it with and without
Ember.run()
but I think the problem is that the component itself is nested in some handlebars logic. What would be the proper way to perform ananimateOut
on this component before it was removed?