Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $rootScope.$on('$stateChangeStart', function(event, toState){
  2. if(toState.name === 'view2'){
  3. $rootScope.stateTransition = "left";
  4. }
  5. if(toState.name === 'view1'){
  6. $rootScope.stateTransition = "right";
  7. }
  8. $rootScope.$apply();
  9. });
  10.  
  11. <div ui-view class='{{stateTransition}}'></div>
  12.  
  13. <div ui-view class='left ng-enter ng-enter-active'></div>
  14. <div ui-view class='right ng-leave ng-leave-active'></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement