![img](http://ww4.sinaimg.cn/mw690/78f9859egw1f6yqame8igj208m0i40vj.jpg)
![img](http://ww4.sinaimg.cn/mw690/78f9859egw1f6yqam996pj20o20hf7ac.jpg)
![img](http://ww1.sinaimg.cn/mw690/78f9859egw1f6yqam17msj20te0bvgr0.jpg)
![img](http://ww1.sinaimg.cn/mw690/78f9859egw1f6yqalarpfj20n90cfdjr.jpg)
![img](http://ww2.sinaimg.cn/mw690/78f9859egw1f6yqcktwjdj20ku112gnj.jpg)
![img](http://ww1.sinaimg.cn/mw690/78f9859egw1f6yqk89kb7j20ku11276h.jpg)
![img](http://ww3.sinaimg.cn/mw690/78f9859egw1f6yqk8ds8jj20ku112js8.jpg)
![img](http://ww3.sinaimg.cn/mw690/78f9859egw1f6yqk8fs25j20ku112gmb.jpg)
dialogs
.controller('DashCtrl', function($scope, $cordovaDialogs) {
$cordovaDialogs.alert('message', 'title', 'button name')
.then(function() {
// callback success
});
$cordovaDialogs.confirm('message', 'title', ['button 1','button 2'])
.then(function(buttonIndex) {
// no button = 0, 'OK' = 1, 'Cancel' = 2
var btnIndex = buttonIndex;
});
$cordovaDialogs.prompt('msg', 'title', ['btn 1','btn 2'], 'default text')
.then(function(result) {
var input = result.input1;
// no button = 0, 'OK' = 1, 'Cancel' = 2
var btnIndex = result.buttonIndex;
});
// beep 3 times
$cordovaDialogs.beep(3);
})
actionsheet
.controller('DashCtrl', function($ionicPlatform, $scope, $cordovaActionSheet) {
$ionicPlatform.ready(function() {
var options = {
title: '你要做什么?',
buttonLabels: ['分享到陈斌彬的技术博客', '分享到朋友圈'],
addCancelButtonWithLabel: '取消',
androidEnableCancelButton: true,
winphoneEnableCancelButton: true,
addDestructiveButtonWithLabel: '删除这个'
};
$scope.showToast = function() {
// $cordovaToast.show(uuid, 'long', 'center');
$cordovaActionSheet.show(options)
.then(function(btnIndex) {
var index = btnIndex;
});
}
});
})
toast
.controller('DashCtrl', function($ionicPlatform, $scope, $cordovaToast) {
$ionicPlatform.ready(function() {
$cordovaToast.showShortTop('Hello World!!');
$scope.showToast = function() {
$cordovaToast
.show('You clicked a button!!', 'long', 'center');
}
});
})