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.4
and 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.js
andwebApp.router.js
. I had usedui.bootstrap
as a dependency inwebApp.module.js
andwebApp.controller.js
.You need only use dependencies in one of your file.