首页 文章
  • 1 votes
     answers
     views

    在角度2中,如何在特定条件下动态管理动画的添加(:输入和:离开)?

    我正在制作动画:输入和:离开页面 . import { animate, AnimationEntryMetadata, state, style, transition, trigger } from '@angular/core'; export const slideInDownAnimation: AnimationEntryMetadata = trigger('routeAnimat...
  • 1 votes
     answers
     views

    Angular2 animate不适用于ngIf

    <div *ngIf="clientTable" [@clientTableState]="testAnimate.state" class="clientdata"> <div class="table-holder"> <table id="header-fixe...
  • 3 votes
     answers
     views

    用于观看计时的Angular2动画

    当时间变化时,例如 . 秒/分钟/小时/天,我想在特定的div块中放置一个动画 . 也许我无法弄清楚如何继续前进 . Demo : https://plnkr.co/edit/jvffeaWFCF6eazdIt3OT?p=preview 当第二次更改时,数字应该来自顶部并且需要到底部类型的动画 . app.component.ts import {Component,OnInit} from '@...
  • 4 votes
     answers
     views

    Angular2 Animation - Animate不透明度,但不是display-attribute

    我想用Angular2动画显示和隐藏我的模态组件 . 目前这是我的代码: animations: [ trigger('modalState', [ state('true', style({ display: 'block', opacity: '1' })), state('false', style({ ...
  • 1 votes
     answers
     views

    Angular2动画回调

    来自https://angular.io/docs/ts/latest/guide/animations.html . Angular文档对此有何意义? 动画启动时以及完成动画时会触发回调 . 无论动画是否被拾取,这些回调都会触发 . template: ` <ul> <li *ngFor="let hero of heroes" ...
  • 1 votes
     answers
     views

    Angular2从父组件触发动画

    我正在尝试在子组件的隐藏元素上触发动画 . 简单来说,动画应该在元素出现时发生,然后每次用户单击父组件中的按钮时 . 这是一个简单的代码:(试图插入它,但无法从角度核心导入触发器组件) app.ts import {ChildComponent} from './child'; @Component({ selector: 'my-app', template: ` <bu...
  • 2 votes
     answers
     views

    如何在Angular 2中应用动画状态更改

    我正在寻找在Angular 2 RC-6应用程序中实现漂亮页面滑动动画的可能性 . 我得到了这篇文章的例子https://www.bennadel.com/blog/3139-experimenting-with-conditional-enter-leave-animations-in-angular-2-rc-6.htm但它实现了内部转换的变化 . 我需要为路由器组件,也就是应用程序页面制作它...
  • 2 votes
     answers
     views

    如何使用Angular2动画更改flex-layout?

    在官方教程的帮助下,我在@ angular / animations中完成了我的第一步 . 我添加了需要的库,我创建了我的第一个动画 . 我已经知道过渡和状态是什么 . 我可以创建简单的动画(更改背景颜色和更改元素的大小 . 我在我的项目中使用@ angular / flex-layout库来创建整洁的页面布局 . 这里有一个问题: How can I animate increasing and...
  • 0 votes
     answers
     views

    Angular2动画:在每个* ngFor上切换状态触发而不是单击

    我正在使用Angular2和Material Design Lite制作一些可扩展的面板 . 我已经按照Angular2站点上的教程进行操作,但是当单击一个面板时,会触发每个项目上的可展开面板 . 这是我的代码: animations: [ trigger('focusPanel', [ state('inactive', style({ backgroundColor: '#eee'...
  • 5 votes
     answers
     views

    angular2组件中的多个动画触发器

    我想在一个组件中定义多个动画触发器 . 这可能吗? 例如,一个用于进入场景,一个用于悬停 . 或者我是否需要为此案例定义两个组件(父子组件)? item.compoennt.ts // removed the import and class part for better readability @Component({ selector: 'item', templateUrl: '...
  • 2 votes
     answers
     views

    Angular2动画'* => void'转换未使用* ngFor Component项激活

    Plunker示例https://plnkr.co/edit/uUs4U63mEItIRvL4nL7s?p=preview 我有一个 ul 的 li 通知,在添加时会滑入 . 我'd like them to slide out when they'已删除,但 transition('* => void') 似乎没有生效,它们只是消失而不是滑回 . 我在这做错了什么?提前致谢 . Edit ...
  • 0 votes
     answers
     views

    Angular2 RC4动画触发器绑定错误

    我在模板中绑定动画触发器名称时收到错误 . [@triggerName]似乎不起作用 . 我错过了什么? 零件 import {Component, ViewChild, ViewChildren, Input, ElementRef, Renderer} from '@angular/core'; import {trigger, state, style, transition, anima...
  • 1 votes
     answers
     views

    Angular2动画[@triggerName]在* ngFor中不起作用

    基本上我希望能够在条件满足时将动画应用到特定的框中 . 在我的应用程序中,当用户给出question1的答案时(在Component1中) - >通过共享服务 - >在COmponent2中我需要通知它,并且如果答案是正确的,我会缩放id = 1的框(我用id来指出盒子特异性的重要性) 由 *ngFor 添加的 [@triggerName] = "my_value_from_...
  • 0 votes
     answers
     views

    管理angular2路由中的动画触发状态

    我正在面对angular2动画的问题 . 应用程序有一个指南系统,用户从步骤1导航到第2步,依此类推 . 现在我有路由动画,其中我的第一个组件向左滑动,第二个组件从右侧滑动,这对于每个步骤都是相同的,这个流程非常好但我想在用户返回上一步时将其反转然后我想要当前组件应向右滑动,之前的组件应从左侧滑入 . animation.ts import {trigger, state, animate, st...

热门问题