angular 4 animations - transition duration is not applied
问题 what am I doing wrong? The transition happens but it's instant. The time set in animate function is not being applied trigger('showMenu', [ state('active', style({ marginLeft: '0px' })), state('inactive', style({ marginLeft: '-230px' })), transition('inactive => active', animate('2s')), transition('active => inactive', animate('2s')) ]) <div [@showMenu]="showMenuState" id="menu-side-wrapper"> MENU <div id="close-menu"> CLOSE </div> </div> 回答1: I've checked the code you've pasted here and it