我在 home 和 models 页面之间有一个有角度的页面过渡动画。两个页面都有一个按钮,home 页面上的按钮 my-button-start-page,models 页面上的 my-button-end-page。
我想在转换期间将 my-button-start-page 移动到 my-button-end-page 的位置。甚至有可能像我在下面的代码中尝试的那样吗?
/*transition between the Home and the Model page*/
transition('Home => Models',[
style({ position: 'relative'}),query(':enter',[
style({
position: 'absolute',top: 0,right: 0,width: '100%',})
]),[style({opacity: 0})]),query('.my-button-start-page',[animate('3s ease-out',style({
**left: 'angular.element(.my-button-end-page).attr("left")',**
top: 'angular.element(.my-button-end-page).attr("top")',width : 'angular.element(.my-button-end-page).attr("width")',height : 'angular.element(.my-button-end-page).attr("height")',opacity: 0 }))]),]),