我正在使用Angular 4动画,我想知道从初始状态到最终状态的最佳方式是什么,通过其他状态。如果我们以此为例(https://angular.io/guide/animations):
animations: [
trigger('animationState', [
state('stateOne', style({
// some style
})),
state('stateTwo', style({
// some style
})),
transition('inactive => active', animate('100ms ease-in')),
transition('active => inactive', animate('100ms ease-out'))
])
]
所以问题是,如果我添加第三个和第四个状态并且我将活动状态从“stateOne”切换到“stateTwo”,那么如何定义转换以使其自动通过其他类似的状态:stateOne => stateThird => stateFourth => stateTwo。有没有办法定义转换,以便在没有任何变通方法的情况下拥有此行为?