$ionicActionSheet Cancel button error


#1

When i press cancel button of ionic action sheet it throws following exception:

Error: 'undefined' is not a function (evaluating 'opts.cancel()')
file:///js/ionic.bundle.js:35259:24
file:///js/ionic.bundle.js:22540:30
completeOutstandingRequest@file:///js/ionic.bundle.js:13042:15
file:///js/ionic.bundle.js:13349:33

#2

you have to add to object with actionsheet definition callback for cancel action

{

cancel: function() {

}

}

or if you dont want any action you can do it in this way:


cancel: angular.noop