Skip to content

Commit ba39fb0

Browse files
committed
fix($ionicActionSheet): provide default functions for options
Fixes #1013
1 parent 730a33b commit ba39fb0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: js/ext/angular/src/service/ionicActionSheet.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ function($rootScope, $document, $compile, $animate, $timeout, $ionicTemplateLoad
7171
show: function(opts) {
7272
var scope = $rootScope.$new(true);
7373

74-
angular.extend(scope, opts);
74+
angular.extend(scope, {
75+
cancel: angular.noop,
76+
buttonClicked: angular.noop,
77+
destructiveButtonClicked: angular.noop
78+
}, opts);
7579

7680
// Compile the template
7781
var element = $compile('<ion-action-sheet buttons="buttons"></ion-action-sheet>')(scope);

0 commit comments

Comments
 (0)