Closed stwiname closed 8 years ago
Thanks for opening this ticket @stwiname. I agree strict DI would be a good improvement so that files using a condition can be minified.
If you or anybody else is interested in making the changes, there are (at least) two places that would need to be adjusted:
$injector
service src/provider.js#L218These could both be modified to check for either a function or Array with two params of correct types. And we'd need to make sure Angular's $injector
service works with strict DI arrays correctly.
Merged and released in v1.2.0, thanks @stwiname!
I'm getting injector errors when trying to set the condition. What I have is;
But when it gets minified
$rootScope
gets replaced with some arbitrary character. This causes Angular to have injector problems.It would be nice if we could rely on stricter Angular DI. Being able to do this would be nice:
But that then throws
Condition callback must be a function