我需要在两种颜色之间进行转换OnClick。现在,这是我的代码:typescriptanimations:[trigger('menubarState',[state('false',style({backgroundColor:'#43a047'})),state('true',style({backgroundColor:'#333'})),transition('false=>true',animate('1s')),transition('true=>false',animate('1s'))])]...exportclassMenubarComponent{menuActiv
我需要在两种颜色之间进行转换OnClick。现在,这是我的代码:typescriptanimations:[trigger('menubarState',[state('false',style({backgroundColor:'#43a047'})),state('true',style({backgroundColor:'#333'})),transition('false=>true',animate('1s')),transition('true=>false',animate('1s'))])]...exportclassMenubarComponent{menuActiv