Angular Animate幻灯片页面从右到右(nganimate) [英] Angular Animate slide pages in from right and out to right side (nganimate)

查看:83
本文介绍了Angular Animate幻灯片页面从右到右(nganimate)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Angular.js进行学校项目.我们还必须在我们的网站中实现一些动画.由于我的网站是主要细节,因此我想滑动详细信息页面(这是单独路由的页面),以便从右侧滑动.这不是真正的问题.但是,当我回到母版"页面时,母版页面将从右侧滑入.我更希望母版页从左侧滑入.

I'm working on a school project using Angular.js. We also have to implement some animations in our website. Since my website is kind of master-detail, I would like to slide the detail page (which is a separately routed page) to slide in from right. This is not really a problem. But when I would go back to the 'master' page the master page would slide in from right. I'd much rather like the master page to slide in from left.

是否有任何方法可以根据页面获取特定的ng-view动画?我想使用CSS动画,但更多细节.

Is there any way to get a specific ng-view animation depending on the page? I'd like to use CSS animations but that's more of a detail.

我正在使用具有ng-view的index.html页面,其中根据导航到的页面加载了模板.

I'm working with an index.html page with an ng-view in which a template gets loaded according to which page is navigated to.

希望任何人都可以帮助我,谢谢!

Hope anyone can help me, thanks!

推荐答案

我在ng-View上找到了有关动画的文章: http://scotch.io/tutorials/animating-angularjs-apps-ngview

I've found an article about animations on ng-View: http://scotch.io/tutorials/animating-angularjs-apps-ngview

您只需要在ng-view容器上添加一个类

You simply have to add a class on the ng-view container

<div class="page {{ pageClass }}" ng-view></div>

和您的控制器中

$scope.pageClass="pageName";

这篇关于Angular Animate幻灯片页面从右到右(nganimate)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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