lxnd 8 năm trước cách đây
mục cha
commit
cc028685c7
2 tập tin đã thay đổi với 13 bổ sung3 xóa
  1. 0 1
      yanshi/www/css/style.css
  2. 13 2
      yanshi/www/js/controllers.js

+ 0 - 1
yanshi/www/css/style.css

xqd
@@ -7,4 +7,3 @@
       right: 0;
       }
       
-

+ 13 - 2
yanshi/www/js/controllers.js

xqd
@@ -36,20 +36,31 @@ starter.controller('loginCtrl',["$scope",'$state','$ionicLoading','$timeout','$i
 	
 }])
 
-starter.controller('homeCtrl',["$scope",'$http','$timeout',function($scope,$http,$timeout){
+starter.controller('homeCtrl',["$scope",'$http','$timeout','$ionicLoading',function($scope,$http,$timeout,$ionicLoading){
 	$scope.excals = [
 		{'list':'测试一'},
 		{'list':'测试二'},
 		{'list':'测试三'}
 	];
 	$scope.doRefresh = function(){
-		 $http.get('../lib/ionic/test.json')  
+		$ionicLoading.show({
+            tcontent: 'Loading',
+		    animation: 'fade-in',
+		    showBackdrop: true,
+		    maxWidth: 200,
+		    showDelay: 0 
+        });
+        $timeout(function(){
+        	$ionicLoading.hide();
+        	$http.get('../lib/ionic/test.json')  
             .success(function(newItems) {
                 $scope.excals = newItems;
             })
             .finally(function() {
                 $scope.$broadcast('scroll.refreshComplete');
             });
+        },1000);
+		
 	}
 }])
 //展示首页控制器