Closed vbyno closed 8 years ago
Hmm, interesting dilemma. I was also considering turning strictDi: true
for @Trustroots.
So I required whole 'ui.bootstrap' module instead of just ui.bootstrap.modal
This wouldn't work in my case, since I'm custom-building ui.bootstrap to avoid having so much not-needed JS. It should work if you also inject template modules, right?
@simison
It should work if you also inject template modules, right?
Yep, it works after adding
angular.module('angular-confirm', ['ui.bootstrap.modal', 'uib/template/modal/window.html', 'uib/template/modal/backdrop.html'])
to this line
Would that implementation be more appropriate?
So, I left it as it was with ui.bootstrap.modal
and just added dependency injection. Now it should just fix this issue
The injection stuff happens automatically when creating the minified version. If you don't have a process in place for that to happen with your build, I recommend using the minified version.
.controller("ConfirmModalController",["$scope","$uibModalInstance","data",function(e,t,i)
I wouldn't agree with that. Minified version is bad for debugging in development mode. Even ui-bootstrap which you use adds injection to the main version not only for minified.
@vbyno I would recommend adding an ng-annotate
step to your build so you can have the best of both worlds.
Guys, I had problems using { strictDi: true } so I added dependency injection to functions. Also I had errors as far as there were no template files. So I required whole 'ui.bootstrap' module instead of just ui.bootstrap.modal. (as was advised here. Suggestions are welcomed. Hope you'll find these changes valuable