I am using $uibmodel in my angular app. I need to open a new modal in a one modal. bcoz of that i need to inject '$uibModal' and '$uibModalInstance' both, in one of my controller. that controller looks somewhat like this. '$uibModal' and '$uibModalInstance' in one controller
baseController.$inject = ['$uibModal', '$uibModalInstance'];
function baseController($uibModal, $uibModalInstance) {
self.ok = function () {
$uibModalInstance.close(self.selected.item);
};
self.cancel = function () {
$uibModalInstance.dismiss('cancel');
};
Now the problem is i am getting error in consolle saying
Unknown provider: $uibModalInstanceProvider <- $uibModalInstance
I know this is because of injecting '$uibModal' and '$uibModalInstance' both in one controller, but i have to. Bcoz of that error in console i am not able to close the second modal. tell me if there any way to use'$uibModal' and '$uibModalInstance' both in one controller. I have to keep both of these in one conteroller.