javascript - Angular 4.2 DSL animation -


i`m try use angular 4.2 new animation api , create simple example when try make fadein / fadeout effects. seems transition fadeout => fadein not called. why?

trigger('divanimation', [     state('fadein', style({opacity: 1})),    state('fadeout', style({opacity: 0})),     transition('* => fadein', [     query('span, p', style({transform: 'translatex(-50px'})),      query('span, p', [       animate(500, style({opacity: 1, transform: 'translatex(0)'})),     ])      ]),      transition('* => fadeout', [       query('span, p', [         animate(500, style({opacity: 0}))         ])      ])   ]) 

https://plnkr.co/edit/0c5esoszz7zkcrdevvos?p=preview

try this:

animations: [  trigger('divanimation', [     state('fadein', style({opacity: 0})),    state('fadeout', style({opacity: 1})),     transition('fadein <=> fadeout', animate(500))    ]) ], 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -