Hi reddyshyam, thanks for your reply. You way didn’t work. There is no id property in modal object.
I have solved it by the following way.
Add a name property when the modal is create such as $scope.modal.name = 'modalA' .
then
Glad you got it working. You can assign ID when you are defining a modal. Please find an example below. Hope this helps.
$ionicModal.fromTemplateUrl('templates/yourmodal.html', {
id: '1', // We need to use and ID to identify the modal that is firing the event!
scope: $scope,
animation: 'slide-in-up',
backdropClickToClose : false
}).then(function(modal) {
$scope.taskModal1 = modal;
});