I'm trying to apply angular 4 animation to list of html elements like
facilities = ['<p> <span class="glyphicon glyphicon-hand-right"> </span> Text 1</p>',
'<p> <span class="glyphicon glyphicon-hand-right"></span>Text 2</p>',
'<p> <span class="glyphicon glyphicon-hand-right"></span> Text 3</p>',
'<p> <span class="glyphicon glyphicon-hand-right"></span> Text 4</p>',
];
one by one with below code:
animations: [
trigger('flyInOut', [
state('in', style({transform: 'translateX(0)'})),
transition('void => *', [
style({transform: 'translateX(-100%)'}),
animate(100)
]),
transition('* => void', [
animate(100, style({transform: 'translateX(100%)'}))
])
])
]
When I put this trigger to list elements, all the elements come one the screen all in one go. I want to make them appear one by one. like fetch text 1 and then text 2 on html. How can I do that?