博客
关于我
Angular开发(二十五)-angular自带动画效果
阅读量:123 次
发布时间:2019-02-26

本文共 732 字,大约阅读时间需要 2 分钟。

angular2????????

????????????

import {Component, OnInit, style, trigger, state, transition, animate, keyframes} from '@angular/core';

@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';}

}

???HTML???????

??????

转载地址:http://svvf.baihongyu.com/

你可能感兴趣的文章
Netty工作笔记0077---handler链调用机制实例4
查看>>
Netty工作笔记0084---通过自定义协议解决粘包拆包问题2
查看>>
Netty工作笔记0085---TCP粘包拆包内容梳理
查看>>
Netty常用组件一
查看>>
Netty常见组件二
查看>>
netty底层源码探究:启动流程;EventLoop中的selector、线程、任务队列;监听处理accept、read事件流程;
查看>>
Netty心跳检测机制
查看>>
Netty核心模块组件
查看>>
Netty框架内的宝藏:ByteBuf
查看>>
Netty框架的服务端开发中创建EventLoopGroup对象时线程数量源码解析
查看>>
Netty源码—2.Reactor线程模型一
查看>>
Netty源码—3.Reactor线程模型三
查看>>
Netty源码—4.客户端接入流程一
查看>>
Netty源码—4.客户端接入流程二
查看>>
Netty源码—5.Pipeline和Handler一
查看>>
Netty源码—5.Pipeline和Handler二
查看>>
Netty源码—6.ByteBuf原理一
查看>>
Netty源码—6.ByteBuf原理二
查看>>
Netty源码—7.ByteBuf原理三
查看>>
Netty源码—7.ByteBuf原理四
查看>>