Advertisement
Guest User

Fix

a guest
Feb 21st, 2019
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const optional = { optional: true };
  2. let toTheRight = [
  3.   query(':enter, :leave', [
  4.     style({
  5.       position: 'absolute',
  6.       top: '0',
  7.       right: 0,
  8.       width: '100%',
  9.     })
  10.   ], optional),
  11.   query(':enter', [
  12.     style({ right: '-100%',  })
  13.   ]),
  14.   group([
  15.     query(':leave', [
  16.       animate('300ms ease', style({ right: '100%', }))
  17.     ], optional),
  18.     query(':enter', [
  19.       animate('300ms ease', style({ right: '0%'}))
  20.     ])
  21.   ]),
  22. ];
  23. let toTheLeft = [
  24.   query(':enter, :leave', [
  25.     style({
  26.       position: 'absolute',
  27.       top: '0',
  28.       left: 0,
  29.       width: '100%',
  30.     })
  31.   ], optional),
  32.   query(':enter', [
  33.     style({ right: '-100%',  })
  34.   ]),
  35.   group([
  36.     query(':leave', [
  37.       animate('300ms ease', style({ left: '100%', }))
  38.     ], optional),
  39.     query(':enter', [
  40.       animate('300ms ease', style({ left: '0%'}))
  41.     ])
  42.   ]),
  43. ]
  44.  
  45.  
  46. export const slider =
  47.   trigger('routeAnimations', [
  48.     transition('* => isLeft', toTheLeft),
  49.     transition('* => isRight', toTheRight),
  50.     transition('isRight => *', toTheLeft),
  51.     transition('isLeft => *', toTheRight),
  52.   ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement