Whoops, sorry about the confusion - I meant "app.animation", not "app.animate" (in the couple of places in my original post where I typed the wrong thing).
On Wednesday, July 9, 2014 5:30:37 PM UTC-4, Chris Frolik wrote: > > I've noticed that if I call app.animation(...) *after* my app has been > bootstrapped, the animation doesn't take effect (in fact, my function never > gets called). Here's an example: > > http://jsfiddle.net/7hbRT/1/ > > If I move the call to registerAnimation out of the controller and up to > the top level, before or after app.controller, it works fine: > > http://jsfiddle.net/7hbRT/2/ > > The real-world reason this is a problem for me is that I have some > animations that are defined "dynamically" (my call to app.animate is > located inside of a <script> element for a DOM node that is added via > ng-if -- the code within the script is code-gen'd by my server-side > code). The affected elements are later added/removed to a collection that's > bound to an ng-repeat. > > Is there something I can do to make this work? The only thing I can think > of is to have a call to app.animate early on that has a generic class > name, such as ".animatable", and the enter/leave functions defer to some > dynamic service to figure out what to do for that particular animatable > element. However, that seems like an extra layer of abstraction I don't > need. > > Thanks. > > -- Chris > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
