I am working with angular-ui-bootstrap. I get this error:
Unknown provider: $uibModalProvider <- $uibModal <- WebAppController
Information
1- Have used ui.bootstrap as a dependency in my app correctly.
angular.module('webApp', ['ui.router', 'ui.bootstrap']);
2- Have injected $uibModal in the controller .
angular.module('webApp').
controller(
'WebAppController',
['webAppService', '$uibModal',
function WebAppController(webAppService, $uibModal) {
# more code here..............
}])
- Using angularJs version
1.6.4and angular-ui-bootstrap version2.5.0.
I would be extremely happy if somebody helps figure out the issue.
This was a careless mistake. For this project, I had three files :
webApp.module.js,webApp.controller.jsandwebApp.router.js. I had usedui.bootstrapas a dependency inwebApp.module.jsandwebApp.controller.js.You need only use dependencies in one of your file.