手动加载视图从控制器中:AngularJS:路由器 [英] AngularJS : router : load view manually from within controller

查看:115
本文介绍了手动加载视图从控制器中:AngularJS:路由器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有从手动加载控制器内的看法的一种方式,之后说了一些动画首次触发?我的情况是previous页面内容向上滑动,之后被关闭时,屏幕上,一旦准备就绪的观点将被更新 - 与新的控制器新视图滑出回落

Is there a way of manually loading the view from within the controller, after say some animation was triggered first? The scenario I have is the previous page content sliding up, after that the view would be updated when being off-the screen and once ready - slides back down with the new view from the new controller.

我已经得到了路由器的设置,但它只是瞬间取代,每当新的控制器被称为视图。

I've got already the router set up, but it just instantly replaces the view whenever the new controller is called.

任何拨弄如果可能的话,请?

Any fiddle if possible please?

推荐答案

角有动画建立在不稳定的分支,它应该完全适合您的方案。
只是检查出的http://www.nganimate.org/angularjs/tutorial/how-to-make-animations-with-angularjs.
NG-视图指令在'输入'和'假'的动画建造。
检查你这个示例: http://jsfiddle.net/nFhX8/18/ 它做更多的少了什么你想达成的目标。

Angular has animations build in in unstable branch, which should perfectly fit your scenario. Just check out http://www.nganimate.org/angularjs/tutorial/how-to-make-animations-with-angularjs. ng-view directive has build in 'enter' and 'leave' animations. Check you this sample: http://jsfiddle.net/nFhX8/18/ which does more less what you'd like to achieve.

这篇关于手动加载视图从控制器中:AngularJS:路由器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆