karma-ng-html2js-preprocessor icon indicating copy to clipboard operation
karma-ng-html2js-preprocessor copied to clipboard

Allow output customization

Open dolzenko opened this issue 10 years ago • 0 comments

I think it would be useful to provide something like templateWrapper option, which will be able to wrap the output, it would make it possible to simplify generation of RequireJS/SystemJS/etc. modules, e.g. for loading Angular with SystemJS:

ngHtml2JsPreprocessor: {
  templateWrapper: function(body) { return "import 'angular';\n" + body; }
}

dolzenko avatar Jun 22 '15 12:06 dolzenko