$uibModalProvider is unknown

352 Views Asked by At

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..............
}])
  1. Using angularJs version 1.6.4 and angular-ui-bootstrap version 2.5.0.

I would be extremely happy if somebody helps figure out the issue.

1

There are 1 best solutions below

0
On

This was a careless mistake. For this project, I had three files : webApp.module.js, webApp.controller.js and webApp.router.js. I had used ui.bootstrap as a dependency in webApp.module.js and webApp.controller.js.

You need only use dependencies in one of your file.