小编Nex*_*obi的帖子

如何实现滑动,捕捉移动页面(离子+ angularjs)

我用Ionic框架和angularjs开发.

我的应用程序有大约5个菜单和设计像谷歌游戏商店

  • 新产品
  • 畅销书
  • 提升
  • 商店......

如何滑动将"新产品"移动到畅销书页面,...(谷歌商店播放 - 像)

这是我的路线:

myApp.config(function ($routeProvider, $locationProvider) {
$routeProvider
    .when('/',
        {
            controller: 'NewProductController',
            templateUrl: 'app/views/newproduct.html'
        })
    .when('/bestseller',
        {
            templateUrl: 'app/views/bestseller.html',
            controller: 'BestsellerController'
        })

    .otherwise({ redirectTo: '/' });    
Run Code Online (Sandbox Code Playgroud)

});

我尝试了ng-swipe-left,ng-swipe-right:

<div ng-swipe-right=goToPage('bestseller')> 
     // new product page
</div>

$scope.goToPage = function (page) {        
    $location.url(page);
};
Run Code Online (Sandbox Code Playgroud)

但不是动画.

请帮忙解决.非常感谢.

swipeview angularjs ionic-framework

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

angularjs ×1

ionic-framework ×1

swipeview ×1