From ba39fb0046cf9ff8b3d18fb8ac7d10d734afe192 Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Fri, 11 Apr 2014 09:30:58 -0600 Subject: [PATCH] fix($ionicActionSheet): provide default functions for options Fixes #1013 --- js/ext/angular/src/service/ionicActionSheet.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ext/angular/src/service/ionicActionSheet.js b/js/ext/angular/src/service/ionicActionSheet.js index 6b89f20b202..2ea1350cfe0 100644 --- a/js/ext/angular/src/service/ionicActionSheet.js +++ b/js/ext/angular/src/service/ionicActionSheet.js @@ -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('')(scope);