I'm working on a school project using Angular.js. We also have to implement some animations in our website. Since my website is kind of master-detail, I would like to slide the detail page (which is a separately routed page) to slide in from right. This is not really a problem. But when I would go back to the 'master' page the master page would slide in from right. I'd much rather like the master page to slide in from left.
Is there any way to get a specific ng-view animation depending on the page? I'd like to use CSS animations but that's more of a detail.
I'm working with an index.html page with an ng-view in which a template gets loaded according to which page is navigated to.
Hope anyone can help me, thanks!
I've found an article about animations on ng-View: http://scotch.io/tutorials/animating-angularjs-apps-ngview
You simply have to add a class on the ng-view container
<div class="page {{ pageClass }}" ng-view></div>
and in your Controllers
$scope.pageClass="pageName";
来源:https://stackoverflow.com/questions/27648895/angular-animate-slide-pages-in-from-right-and-out-to-right-side-nganimate