【问题标题】:Angular2 animation '* => void' transition not activating with *ngFor Component itemAngular2 动画 '* => void' 过渡未使用 *ngFor 组件项激活
【发布时间】:2016-10-31 19:43:22
【问题描述】:

Plunker 示例 https://plnkr.co/edit/uUs4U63mEItIRvL4nL7s?p=preview

我有一个ulli 通知在添加时会滑入。我希望它们在被删除时滑出,但transition('* => void') 似乎没有生效,它们只是消失而不是滑出。我在这里做错了什么?提前致谢。

编辑 这是一个扩展的 plunker 示例,显示它与本地列表一起使用,但在使用组件构建列表时不可用。

https://plnkr.co/edit/8WZGZu3tuSVBrzUZxBwE?p=preview

【问题讨论】:

    标签: angular angular2-animation


    【解决方案1】:

    我已经处理过这种情况,在组件外部获取动画并使用“display: block”定义组件标签 css

    Here 是工作示例。关键思想是

    notification {display: block;}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-05-07
      • 1970-01-01
      • 1970-01-01
      • 2011-03-31
      • 1970-01-01
      • 2012-03-24
      • 2015-12-20
      相关资源
      最近更新 更多