Hi,<div>is there a way to explicitly declare keycloak module as dependency?</div><div><br></div><div>I've searched about similar issues [1], and it might be connected to the way interceptors are declared. To me, it seems like keycloak.js doesn't inject routerConfig the right (angular) way, but I might be wrong here.</div><div><br></div><div>[1]&nbsp;<a href="http://stackoverflow.com/questions/28212837/keycloak-unknown-provider-error">http://stackoverflow.com/questions/28212837/keycloak-unknown-provider-error</a><br>On Fri, Apr 22, 2016 at 11:26 AM, Bartosz Andrzejczak &lt;ba.andrzejczak@gmail.com&gt; wrote:<br>
<blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8">Hi Dejan,<div class=""><br class=""></div><div class="">See this:&nbsp;<a href="https://docs.angularjs.org/error/$injector/strictdi" class="">https://docs.angularjs.org/error/$injector/strictdi</a></div><div class=""><br class=""></div><div class="">Just define your dependencies explicitly like this:</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">angular.module(‘myModule’).controller(‘test’, [‘$scope’, function ($scope) {</font></div><div class=""><font face="Courier New" class="">&nbsp; ...</font></div><div class=""><font face="Courier New" class="">}]);</font></div><div class=""><br class=""></div><div class="">or use ng-annotate [1] with your build system to do that for you.</div><div class=""><br class=""></div><div class="">[1]&nbsp;<a href="https://github.com/olov/ng-annotate" class="">https://github.com/olov/ng-annotate</a><br class=""><div><blockquote type="cite" class=""><div class="">On 22 Apr 2016, at 11:11 AM, Dejan B &lt;<a href="mailto:dejan.benedik@gmail.com" class="">dejan.benedik@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">Hello,<div class=""><br class=""></div><div class="">we encountered a worrisome error while developing a SPA with Angular 1.5.3 and Keycloak 1.9.1 for authentication.</div><div class="">If we run the application with strict dependency injection, bootstraping will fail with the following error:</div><div class=""><div class=""><br class=""></div><div class="">Error: [$injector:modulerr] Failed to instantiate module zis due to:</div><div class="">[$injector:strictdi] routerConfig is not using explicit annotation and cannot be invoked in strict mode</div><div class=""><a href="http://errors.angularjs.org/1.5.4/$injector/strictdi?p0=routerConfig" class="">http://errors.angularjs.org/1.5.4/$injector/strictdi?p0=routerConfig</a></div><div class="">minErr/&lt;@<a href="http://localhost:3000/bower_components/angular/angular.js:68:12" class="">http://localhost:3000/bower_components/angular/angular.js:68:12</a></div><div class="">annotate@<a href="http://localhost:3000/bower_components/angular/angular.js:3903:1" class="">http://localhost:3000/bower_components/angular/angular.js:3903:1</a></div><div class="">injectionArgs@<a href="http://localhost:3000/bower_components/angular/angular.js:4626:21" class="">http://localhost:3000/bower_components/angular/angular.js:4626:21</a></div><div class="">invoke@<a href="http://localhost:3000/bower_components/angular/angular.js:4657:18" class="">http://localhost:3000/bower_components/angular/angular.js:4657:18</a></div><div class="">runInvokeQueue@<a href="http://localhost:3000/bower_components/angular/angular.js:4558:11" class="">http://localhost:3000/bower_components/angular/angular.js:4558:11</a></div><div class="">loadModules/&lt;@<a href="http://localhost:3000/bower_components/angular/angular.js:4567:11" class="">http://localhost:3000/bower_components/angular/angular.js:4567:11</a></div><div class="">forEach@<a href="http://localhost:3000/bower_components/angular/angular.js:322:11" class="">http://localhost:3000/bower_components/angular/angular.js:322:11</a></div><div class="">loadModules@<a href="http://localhost:3000/bower_components/angular/angular.js:4548:5" class="">http://localhost:3000/bower_components/angular/angular.js:4548:5</a></div><div class="">createInjector@<a href="http://localhost:3000/bower_components/angular/angular.js:4470:19" class="">http://localhost:3000/bower_components/angular/angular.js:4470:19</a></div><div class="">bootstrap/doBootstrap@<a href="http://localhost:3000/bower_components/angular/angular.js:1746:20" class="">http://localhost:3000/bower_components/angular/angular.js:1746:20</a></div><div class="">bootstrap@<a href="http://localhost:3000/bower_components/angular/angular.js:1767:1" class="">http://localhost:3000/bower_components/angular/angular.js:1767:1</a></div><div class="">zisStartup/&lt;@<a href="http://localhost:3000/app/index.run.js:110:9" class="">http://localhost:3000/app/index.run.js:110:9</a></div><div class="">createPromise/p.setSuccess@<a href="http://localhost:3000/bower_components/keycloak/dist/keycloak.js:714:25" class="">http://localhost:3000/bower_components/keycloak/dist/keycloak.js:714:25</a></div><div class="">Keycloak/kc.init/&lt;@<a href="http://localhost:3000/bower_components/keycloak/dist/keycloak.js:96:17" class="">http://localhost:3000/bower_components/keycloak/dist/keycloak.js:96:17</a></div><div class="">createPromise/p.setSuccess@<a href="http://localhost:3000/bower_components/keycloak/dist/keycloak.js:714:25" class="">http://localhost:3000/bower_components/keycloak/dist/keycloak.js:714:25</a></div><div class="">authSuccess@<a href="http://localhost:3000/bower_components/keycloak/dist/keycloak.js:518:36" class="">http://localhost:3000/bower_components/keycloak/dist/keycloak.js:518:36</a></div><div class="">processCallback/req.onreadystatechange@<a href="http://localhost:3000/bower_components/keycloak/dist/keycloak.js:490:29" class="">http://localhost:3000/bower_components/keycloak/dist/keycloak.js:490:29</a></div></div><div class=""><br class=""></div><div class="">Without strict DI, the application runs fine, but the issue occurs every time we try to run minified code.</div><div class="">How could we solve this problem?</div><div class=""><br class=""></div><div class="">Cheers, Dejan</div>_______________________________________________<br class="">keycloak-user mailing list<br class=""><a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class=""><a href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></div></blockquote></div><br class=""></div></blockquote></div>