Angular2 动画 '* => void' 转换未使用 *ngFor Component 项目激活
Angular2 animation '* => void' transition not activating with *ngFor Component item
Plunker 示例
https://plnkr.co/edit/uUs4U63mEItIRvL4nL7s?p=preview
我有 ul
条通知,共 li
条通知在添加时滑入。我希望它们在删除时滑出,但 transition('* => void')
似乎没有生效,它们只是消失而不是滑出。我在这里做错了什么?提前致谢。
编辑
这是一个扩展的 plunker 示例,显示它与本地列表一起使用,但在使用组件构建列表时却没有。
我已经处理过这种情况,在组件外部获取动画并用 "display: block"
定义组件标签 css
Here 是工作示例。关键思想是
notification {display: block;}
Plunker 示例 https://plnkr.co/edit/uUs4U63mEItIRvL4nL7s?p=preview
我有 ul
条通知,共 li
条通知在添加时滑入。我希望它们在删除时滑出,但 transition('* => void')
似乎没有生效,它们只是消失而不是滑出。我在这里做错了什么?提前致谢。
编辑 这是一个扩展的 plunker 示例,显示它与本地列表一起使用,但在使用组件构建列表时却没有。
我已经处理过这种情况,在组件外部获取动画并用 "display: block"
定义组件标签 cssHere 是工作示例。关键思想是
notification {display: block;}