I want to mangle my AngularJS file, and it works for almost the whole part. However, when I click through the app and navigate to the only part that uses ngLazyBind and angular-history, I get the following issue: Error: [$injector:unpr] Unknown provider: aProvider <- a <- $lazyBind
.
I am using ngMin in hopes that this kind of stuff wouldn't happen. When I set uglify's mangled
property to false
, this issue goes away.
Another little note - injecting $lazyBind
into a controller is what causes the error. I can include lazyBind
in the app without issue, but when I inject $lazyBind
into a controller the error arises.
The reason I mention angular-history is if I completely eliminate lazyBind, the exact same error appears with Error: [$injector:unpr] Unknown provider: mProvider <- m <- History
.