Closed atais closed 8 years ago
You need to follow the guidelines and use ngAnnotate or use the minified version.
I forgot that you build script does not affect my files, so yes your minification works OK.
However, I think its a matter of "good practice" that you should provide the lib that could be easily minified. All other libraries worked that way. And I noticed I was not the first one to encounter this issue.
Version 1.2.4
I have a build script with gulp-ng-annotate, however I think I am getting the same error.
[$injector:unpr] Unknown provider: tProvider <- t <- confirmDirective
Hello!
So I have found a small issue in your library. I build my application using normal sources and minify/uglyfy it all together with my app.
After minification I encountered error described here: https://docs.angularjs.org/error/$injector/unpr?p0=eProvider%20%3C-%20e%20%3C-%20$confirm%20%3C-
A quick googling gave me this hint: http://stackoverflow.com/questions/13459452/rails-3-angularjs-minification-does-not-work-in-production-unknown-provider
And so I have found in your code the missing parts:
they should look like this:
But later I noticed you are using
ngAnnotate = require('gulp-ng-annotate'),
in your build script.However if you want it to work properly you need to follow this guidelines: https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#minification-and-annotation
I can fix it and present a pull-request if you prefer.