Ionic framework 如何使用进度百分比更新$ionicLoading?
正在处理Ionic项目,并使用Ionic framework 如何使用进度百分比更新$ionicLoading?,ionic-framework,ionic,Ionic Framework,Ionic,正在处理Ionic项目,并使用$ionicLoading显示下载进度(此进度需要锁定UI)。 因此,如何使用$ionicLoading将进度百分比(文本)更新为?只需调用$ionicLoading.show({template:'updated text'}),它将再次替换下一次。我建议使用scope属性: // In your controller or us any scope you want. $scope.uploadProgress = 0; // update this in yo
$ionicLoading
显示下载进度(此进度需要锁定UI)。
因此,如何使用
$ionicLoading
将进度百分比(文本)更新为?只需调用$ionicLoading.show({template:'updated text'})
,它将再次替换下一次。我建议使用scope属性:
// In your controller or us any scope you want.
$scope.uploadProgress = 0; // update this in your progress callback
// show once
$ionicLoading.show({
scope: $scope,
template: '<p>Saving...</p><p>{{uploadProgress}}</p><ion-spinner></ion-spinner>'
});
//在您的控制器或我们的任何范围内。
$scope.uploadProgress=0;//在进度回调中更新此项
//表演一次
$ionicLoading.show({
范围:$scope,
模板:'正在保存…{{uploadProgress}}'
});