离子复习工作不正常 [英] Ionic refresher working not properly

查看:110
本文介绍了离子复习工作不正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ionicframework.It使用开发Android应用程序一个<离子进修> 时,下拉页面,但它没有工作动态加载的内容。

 <离子进修
                          拉文=拉刷新......
                          在刷新=doRefresh>
            < /离子进修>

控制器

  $ scope.doRefresh =功能(){
              $ http.get('HTTP://localhost/test/gksfapp_backend.php行动=的')。然后(函数(MSG){
                     //永远不会执行。
                     $ scope.items = msg.data;
                     })
                     。最后(函数(){
                     //停止从纺纱离子进修
                         。$ $范围广播('scroll.refreshComplete');
               });


解决方案

我相信你干脆遗忘的 doRefresh

括号

 <离子进修
                      拉文=拉刷新......
                      上刷新=doRefresh()>
        < /离子进修>

此外,这里是一个工作code例子。
HTTP://$c$cpen.io/ionic/pen/mqolp

I am developing android app using ionicframework.It use a <ion-refresher> to load the contents dynamically when pull down the page,but it didnt work.

           <ion-refresher
                          pulling-text="Pull to refresh..."
                          on-refresh="doRefresh">
            </ion-refresher>

controller

$scope.doRefresh = function() {
              $http.get('http://localhost/test/gksfapp_backend.php?action=an').then(function(msg){
                     //never executed.
                     $scope.items=msg.data;
                     })
                     .finally(function() {
                     // Stop the ion-refresher from spinning
                         $scope.$broadcast('scroll.refreshComplete');
               });

解决方案

I believe you have simply forgotten the parenthesis after doRefresh

       <ion-refresher
                      pulling-text="Pull to refresh..."
                      on-refresh="doRefresh()">
        </ion-refresher>

Also, here is a working code example. http://codepen.io/ionic/pen/mqolp

这篇关于离子复习工作不正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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