Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

inject provider into directive not working

Tags:

angularjs

I'm trying to use angular-bootstrap-lightbox , and i need to inject Lightbox provider into directive like so

controller: ['Lightbox' , function ($scope, $rootScope, $filter, FileUploader,Lightbox) {

but this is lead to the following error :

Error: [$injector:unpr] Unknown provider: $uibModalProvider <- $uibModal <- Lightbox <- Lightbox

any body can help to resolve this , Thanks in advance .

like image 612
Hasan Daghash Avatar asked Dec 11 '22 20:12

Hasan Daghash


2 Answers

Version issue with ui-boostrap. Need to upgrade ui-bootstrap to be 0.14x or above. See this github issue as well

like image 115
jgraft Avatar answered Jan 01 '23 12:01

jgraft


If you are unable to upgrade angular-bootstrap past 0.12.0, make sure that your angular-dialog-service is at version 5.2.6 exactly (no ~s or ^s preceding it!). Downgrading angular-dialog-service solved this issue for us.

like image 25
piercebot Avatar answered Jan 01 '23 14:01

piercebot