本文共 732 字,大约阅读时间需要 2 分钟。
angular2????????@Component({selector: 'app-page1',templateUrl: './page1.component.html',styleUrls: ['./page1.component.css'],animations: [trigger('loginAnimation', [state('normal', style({transform: 'scale(1)'})),state('active', style({transform: 'scale(1.5)'})),transition('normal => active', animate('100ms ease-in')),transition('active => normal', animate('100ms ease-out'))])]})export class Page1Component implements OnInit {private loginBtnState: string = 'inactive';
constructor() {}ngOnInit() {}toggleLoginState(state: boolean) { this.loginBtnState = state ? 'active' : 'inactive';} }
转载地址:http://svvf.baihongyu.com/