Closed willpracht closed 8 years ago
Sorry for the late response, was on holiday the last week. It would be nice, but this cannot be done by minimize. This requires a custom domparser for htmlparser2
that understands the fact template strings are included in the HTML. I won't add support for this directly in the module, rather i'd make sure minification happens until after the template is parsed
Hey, not a problem. I know we've all got lives outside of work (hopefully).
I ended up having to switch over to html-minifier via gulp-htmlmin (instead of gulp-minify-html) which uses minimize.
Unfortunately I have to do my minification before parsing the template. We're generating our $templateCache
(Angular) from our templates, then parsing said templates full of LoDash template strings later on when the app is served. Not really the most ideal situation, admittedly. And maybe that's our real solution, to strip these template strings altogether and utilize the power of Angular expressions in all instances instead of most.
Thanks for the reply, man. Appreciate your time :).
Looks like minimize is interpreting Underscore template strings as HTML elements.
Example:
Original
Minified
It would be nice if it recognized these template strings and didn't attempt to either close the tag or transform the placeholder to lowercase.