Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 顺序路由动画2_Angularjs_Angular_Animation_Routing - Fatal编程技术网

Angularjs 顺序路由动画2

Angularjs 顺序路由动画2,angularjs,angular,animation,routing,Angularjs,Angular,Animation,Routing,我正在尝试在Angular 2中的路线之间设置动画,我遇到了Angular 1中遇到的相同问题。我希望路由器组件之间的动画按顺序发生,因此进入的组件将等待离开组件完成其离开动画,然后再添加到DOM并开始其进入动画。默认情况下,Angular 2中的管线动画同步发生,如下所示 RouteComponent 1: Enter animation Move to a new route RouteComponent 2 Element added to the DOM && Route

我正在尝试在Angular 2中的路线之间设置动画,我遇到了Angular 1中遇到的相同问题。我希望路由器组件之间的动画按顺序发生,因此进入的组件将等待离开组件完成其离开动画,然后再添加到DOM并开始其进入动画。默认情况下,Angular 2中的管线动画同步发生,如下所示

RouteComponent 1: Enter animation
Move to a new route
RouteComponent 2 Element added to the DOM && RouteComponent 2: Enter animation && RouteComponent 1: Leave animation
RouteComponent 1 Element removed from DOM
RouteComponent 1: Enter animation
Move to a new route
RouteComponent 1: Leave animation
RouteComponent 1 Element removed from DOM
RouteComponent 2 Element added to the DOM
RouteComponent 2: Enter animation
这意味着,如果我想让组件2的外观等待组件1完成其离开动画,我必须为组件2的进入动画添加延迟,并将其定位为固定或绝对。我真正想要的是下面这样的东西

RouteComponent 1: Enter animation
Move to a new route
RouteComponent 2 Element added to the DOM && RouteComponent 2: Enter animation && RouteComponent 1: Leave animation
RouteComponent 1 Element removed from DOM
RouteComponent 1: Enter animation
Move to a new route
RouteComponent 1: Leave animation
RouteComponent 1 Element removed from DOM
RouteComponent 2 Element added to the DOM
RouteComponent 2: Enter animation
是否有人能够在不增加延迟或使用固定或绝对定位的情况下实现这一点?

Hey True Quillive--在将第二个元素添加到DOM之前需要完全删除一个元素的用例是什么?Hey True Quillive--在添加之前需要完全删除一个元素的用例是什么第二个元素可以添加到DOM中吗?