Hi Guys,

I am rather new to Angular JS and I could really use some help with an 
animation issue.

I've created a simple app with a couple of views. 

Now I'd really like to add some eye-candy to the app by animating from one 
view to another.

This also works like a charm, however, if I scroll down in one view, and 
then navigate to another, the new view maintains the scroll position of the 
previous view.


My code containing the view, looks as follows:

<div data-appMainView ng-controller="appCtrl">
 <error></error>
<div ng-view></div>

</div>

I've tried resetting the scroll position in the $routeChangeSuccess using
 $('[data-appMainView]').scrollTop(0);
This works, however, it scrolls the "old" view to the top while performing 
the animation, thus resulting in a page jumping back to the top and then 
animating out.

Furthermore I've played around with the autoscroll attribute (on the 
ng-view div) and $anchorSCroll but I can't seem to get it to work.

Basically, what I really would like to create is an animation where the old 
page fades maintaining it's scroll position away and the new page slides in 
from the side scrolled to the top of the page.

I hope I described the situation as clearly as possible.
Any help would be much appreciated.


Cheers,
Allard

-- 
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.

Reply via email to