I have AngularJS app (version 1.4.7) and latest version of ui.bootstrap. Problem occurs when I try to inject $uibModalInstance which throws error Unknown provider: $uibModalInstanceProvider
Here is controller code:
/**
* @constructor
* @param $uibModal
*/
function ClientsController($uibModal)
{
var _this = this;
_this.$uibModal = $uibModal;
}
/**
*
*/
ClientsController.prototype.create = function()
{
var instance = this.$uibModal.open(
{
animation: true,
templateUrl: 'modules/clients/views/modal/client.html',
controller: 'ClientModalInstController as ctrl',
size: 'lg'
}
);
};
Here is modal controller
ClientModalInstController.$inject = [
'$uibModalInstance'
];
/**
* @constructor
* @param $uibModalInstance
*/
function ClientModalInstController($uibModalInstance)
{
var _this = this;
_this.$uibModalInstance = $uibModalInstance;
}
Any idea what could cause this kind of behavior?