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:
- Don't let the new view render until the content has loaded or
- 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.