Undefined is not an object (evaluating '$window.plugins.actionsheet')


#1

$scope.loadImage = function() {
var options = {
title: ‘Select Image Source’,
buttonLabels: [‘Select From Gallery’, ‘Take Picture’],
addCancelButtonWithLabel: ‘Cancel’,
androidEnableCancelButton : true,
};
$ionicPlatform.ready(function() {

$cordovaActionSheet.show(options).then(function(btnIndex) {
var type = null;
if (btnIndex === 1) {
type = Camera.PictureSourceType.PHOTOLIBRARY;
} else if (btnIndex === 2) {
type = Camera.PictureSourceType.CAMERA;
}
if (type !== null) {
$scope.selectPicture(type);
}
});
});
};

this my code. I have run code in iOS i have face undefined is not an object (evaluating ‘$window.plugins.actionsheet’) issue in safari browser .