mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix($ionicActionSheet): provide default functions for options
Fixes #1013
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user