diff --git a/js/angular/service/actionSheet.js b/js/angular/service/actionSheet.js index 27223c6757..ac7e14b735 100644 --- a/js/angular/service/actionSheet.js +++ b/js/angular/service/actionSheet.js @@ -40,6 +40,66 @@ * ``` * */ + +/** + * @ngdoc demo + * @name $ionicActionSheet#simple + * @module actionSheetSimple + * @javascript + * angular.module('actionSheetSimple', ['ionic']) + * .controller('ActionSheetCtrl', function($scope, $ionicActionSheet) { + * $scope.messages = []; + * $scope.takeAction = function() { + * $ionicActionSheet.show({ + * buttons: [ + * { text: 'Share ' }, + * { text: 'Edit ' } + * ], + * destructiveText: 'Delete ', + * titleText: 'Modify your album', + * cancelText: 'Cancel', + * cancel: function() { + * $scope.message('Cancel'); + * return true; + * }, + * buttonClicked: function(index) { + * $scope.message(index === 0 ? 'Share' : 'Edit'); + * return true; + * }, + * destructiveButtonClicked: function() { + * $scope.message('Delete'); + * return true; + * } + * }); + * }; + * $scope.message = function(msg) { + * $scope.messages.unshift({ + * text: 'User pressed ' + msg + * }); + * }; + * + * }); + * + * @html + * + *

Action

+ *
+ * + *
+ * Take Action! + *
+ *
+ *
+ * User Log + *
+ *
+ *
+ * {{message.text}} + *
+ *
+ *
+ *
+ */ IonicModule .factory('$ionicActionSheet', [ '$rootScope', diff --git a/js/angular/service/popup.js b/js/angular/service/popup.js index 68e8a05af6..c83b5eb587 100644 --- a/js/angular/service/popup.js +++ b/js/angular/service/popup.js @@ -187,6 +187,9 @@ angular.module('popupSimple', ['ionic']) }; }); * @html + +

Popups

+
@@ -194,7 +197,7 @@ angular.module('popupSimple', ['ionic'])