Cleanup router animation code
This commit is contained in:
@@ -5,34 +5,30 @@ import { Angulartics2Piwik } from 'angulartics2/piwik';
|
|||||||
|
|
||||||
export const routerTransition = trigger('routerTransition', [
|
export const routerTransition = trigger('routerTransition', [
|
||||||
transition('* <=> *', [
|
transition('* <=> *', [
|
||||||
// Initial state of new route
|
|
||||||
query(':enter',
|
query(':enter',
|
||||||
style({
|
style({
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
// transform: 'translateX(-100%)'
|
height: '100%',
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}),
|
}),
|
||||||
{optional: true}),
|
{optional: true}),
|
||||||
|
|
||||||
// move page off screen right on leave
|
|
||||||
query(':leave',
|
query(':leave',
|
||||||
animate('300ms ease-in-out',
|
animate('300ms ease-in-out',
|
||||||
style({
|
style({
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
// transform: 'translateX(100%)'
|
height: '100%',
|
||||||
opacity: 0
|
opacity: 0
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
{optional: true}),
|
{optional: true}),
|
||||||
|
|
||||||
// move page in screen from left to right
|
|
||||||
query(':enter',
|
query(':enter',
|
||||||
animate('300ms ease-in-out',
|
animate('300ms ease-in-out',
|
||||||
style({
|
style({
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
// transform: 'translateX(0%)'
|
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
{optional: true}),
|
{optional: true}),
|
||||||
|
|||||||
Reference in New Issue
Block a user