動畫我使用$ ionicLoading同時加載從靜止服務內容和隱藏在然後呼叫承諾的加載進度。 這隻在第一次需要數據時完成。 然後,我使用拉來刷新(ionRefresher)以刷新數據,但是刷新器中的ionSpinner被凍結(沒有動畫)。 我認爲在致電$ ionicLoading.hide()時會出現錯誤,它凍結了所有ionSpinners。我的平臺是android。下面是僅使用ionSpinner和$ ionicLoading此行爲的小例子:http://codepen.io/oscarmesa/pen/EKyrMr
HTML:
<html ng-app="app">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Ionic Loading</title>
<link href="http://code.ionicframework.com/1.2.4/css/ionic.min.css" rel="stylesheet">
<script src="http://code.ionicframework.com/1.2.4/js/ionic.bundle.js"></script>
</head>
<body ng-controller="myController">
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Loading...</h1>
</ion-header-bar>
<ion-content>
<ion-spinner></ion-spinner>
</ion-content>
</ion-pane>
</body>
</html>
JS:
angular.module('app',['ionic'])
.config(function() {
//Set platform UI to android
ionic.Platform.setPlatform('android');
})
.controller('myController',function($ionicLoading){
$ionicLoading.show();
setTimeout(function(){
$ionicLoading.hide();
},5000);
});
沒有我的答案和codepen例如解決您的問題? – TaeKwonJoe