0

I have an angular app that uses $resource to load data into the views. I used ngAnimate's ng-animate-ref to transition an image from one view to another. This worked fine when the data was hardcoded into the controller, but when I use $resource or $http, the data takes a little longer to load and therefore there is no identifier in the ng-animate-ref directive to help link the two images together. I figure I need to do either one of two things:

  1. Don't let the new view render until the content has loaded or
  2. Ensure the data from the previous load is cached and available instantly

Is this possible to do? I can provide a plunker if it's necessary.

Alex Wohlbruck
  • 1,340
  • 2
  • 25
  • 41

0 Answers0