Injector returned by angular.bootstrap is not treated
spalger opened this issue · 7 comments
spalger commented
Calls to angular.bootstrap return an injector, but ngmin doesn't extract dependencies from there. I have a call to invoke chained to my bootstrap call that isn't be wrapped by ngmin.
angular.bootstrap(document, [])
.invoke(function ($rootScope) {
// this function isn't wrapped in it's dependencies by ngmin
})
majgis commented
+1 I'm experiencing the same issue.
ludoblues commented
+1
viniciusffj commented
+1
viniciusffj commented
Anyone know some workaround to this situation?
Thanks
spalger commented
@viniciusffj just use the array notation until it is supported.
angular.bootstrap(document, [])
.invoke(['$rootScope', function ($rootScope) {
// this function isn't wrapped in it's dependencies by ngmin
}])
viniciusffj commented
Thanks @spenceralger , it worked.
eddiemonge commented
Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93
If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues
If you really want ngmin to fix this issue, feel free to fork it and use that.