3
如何延遲* ngFor的每個項目來一個接一個地動畫?如何延遲每個ngFor項目動畫
我的意思是這樣的:
<li *ngFor="let item of items"> //end result like below:
<a [@flyIn]="'in'">first item</a> // delay 100ms and animate
<a [@flyIn]="'in'">first item</a> // delay 200ms and animate
<a [@flyIn]="'in'">first item</a> // delay 300ms and animate
<a [@flyIn]="'in'">first item</a> // delay 400ms and animate
<a [@flyIn]="'in'">first item</a> // delay 500ms and animate
</li>
做我需要一些時間間隔將項目添加到項目陣列或者也許有一些simplier方式?
也許類似http://stackoverflow.com/questions/39762304/angular-2-loop通過一個列表與一些延遲/ 39763030#39763030 –
似乎有點複雜這樣一個簡單的任務,但謝謝你,我會嘗試用這種方法 –
嘗試設置它在一個窗口屬性在這個問題上: http:// st ackoverflow.com/questions/40145581/angular-2-pass-delay-to-component-animation-as-input-parameter – user3567879