$cordovaProgress 用于上传下载文件 进度条提示
$cordovaProgress
下载,上传,加载进度对话框显示
cordova plugin add https://github.com/pbernasconi/cordova-progressIndicator.git
$cordovaProgress 方法(Methods)
show*(isHide,Text)
显示不同的进度对话框可以选择使用下述方法,均有预览
参数 | 类型 | 说明 |
---|---|---|
isHide | Boolean | 进度100%是否隐藏 |
Text | String | 进度提示信息 |
hide()
后动隐藏进度对话框
参数 | 类型 | 说明 |
---|
更多进度条样式极方法参考
方法 | 类型 | 效果 |
---|---|---|
showSimple(true) | Simple | |
showDeterminateWithLabel(true, 50000, “Loading”) | Determin | |
showAnnular(true, 50000) | Annular | |
showBar(true, 50000) | Bar | |
showSuccess(true, “Success!”) | Success | |
showText(false, 100000, “Loading”) | Text |
代码实例
module.controller('MyCtrl', function($scope, $cordovaProgress) {
$cordovaProgress.showSimple(true) // requires .hide()
$cordovaProgress.showSimpleWithLabel(true, "Loading") // .hide()
$cordovaProgress.showSimpleWithLabelDetail(true, "Loading", "detail")
// requires .hide()
$cordovaProgress.hide()
$cordovaProgress.showDeterminate(false, 100000)
$cordovaProgress.showDeterminateWithLabel(true, 50000, "Loading")
$cordovaProgress.showAnnular(true, 50000)
$cordovaProgress.showAnnularWithLabel(false, 100000, "Loading")
$cordovaProgress.showBar(true, 50000)
$cordovaProgress.showBarWithLabel(false, 100000, "Loading")
$cordovaProgress.showSuccess(true, "Success!") // requires .hide()
$cordovaProgress.showText(false, 100000, "Loading")
});