Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix($ionicActionSheet): provide default functions for options
Fixes #1013
  • Loading branch information
ajoslin committed Apr 11, 2014
1 parent 730a33b commit ba39fb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/ext/angular/src/service/ionicActionSheet.js
Expand Up @@ -71,7 +71,11 @@ function($rootScope, $document, $compile, $animate, $timeout, $ionicTemplateLoad
show: function(opts) {
var scope = $rootScope.$new(true);

angular.extend(scope, opts);
angular.extend(scope, {
cancel: angular.noop,
buttonClicked: angular.noop,
destructiveButtonClicked: angular.noop
}, opts);

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

0 comments on commit ba39fb0

Please sign in to comment.