I have created an Angular animation for my application,Here is the code :
export const slideToRight = trigger('routerAnimate', [
state('void', style({position: 'fixed', 'width': '100%', 'height': '70%'})),
state('*', style({position: 'fixed', 'width': '100%', 'height': '70%'})),
transition('void => *', [
style({transform: 'translateX(-100%)'}),
animate('5s ease-in', style({transform: 'translateX(0)'}))
]),
transition('* => void', [
style({transform: 'translateX(0)'}),
animate('5s ease-out', style({transform: 'translateX(100%)'}))
])
]);`
And i use HostBinding in my Component.ts like this
@HostBinding('@routerAnimate') state;
The code is too long, so it is not posted. please look my gitHubmy application why my animation's transition not working thanks a lot