Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $rootScope.$on('$stateChangeStart', function(event, toState){
- if(toState.name === 'view2'){
- $rootScope.stateTransition = "left";
- }
- if(toState.name === 'view1'){
- $rootScope.stateTransition = "right";
- }
- $rootScope.$apply();
- });
- <div ui-view class='{{stateTransition}}'></div>
- <div ui-view class='left ng-enter ng-enter-active'></div>
- <div ui-view class='right ng-leave ng-leave-active'></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement