Trigger animations when page changes using Velocity


#1

I would like to trigger a given animation specific to one or more elements (e.g. a collection of images within a given div) whenever a page is (re-)loaded or transitioned to.

I’ve tried putting this within the init() of the controller but this doesn’t seem to work.

What does seem to work (although unpredictably) is firing off the animation within an Ember.run.later() but this depends on choosing a large enough value of wait which isn’t very elegant and probably the wrong thing to do.

I’ve also tried Ember.run.scheduleOnce() but this is also not very dependable.

Sometimes transitioning works but refresh not, or vice versa.

At first glance Liquid Fire seemed promising, but it doesn’t quite support what I’m looking for.

What would be the best approach?


#2

Any luck? Have you checked out ember-concurrency?


#3

I will check it out, thanks.