Directive isn't minification-proof
leehsueh opened this issue · 8 comments
leehsueh commented
When including the directive and compressing/minifying it, the resulting js file cannot find/compile the directive. The resulting error is:
Error: [$injector:unpr] Unknown provider: aProvider <- a <- btfMarkdownDirective
To fix this, the directive needs to be defined with the array syntax:
directive('btfMarkdown', ['$sanitize', function ($sanitize) {...}])
carueda commented
Or, as suggested in the style guide with
... directive('btfMarkdown', btfMarkdownDirective)
...
btfMarkdownDirective.$inject = ['$sanitize'];
function btfMarkdownDirective($sanitize) { ... }
felixls commented
+1
rebornix commented
Any update on this issue, still not fixed?
matt-way commented
+1
jaytaylor commented
Has a PR been opened for this?
powmedia commented
+1