ng-html2js
ng-html2js copied to clipboard
can I use it like require(ng-html2js)
RT
Yes, here's how:
Ask the question on stack overflow.
JK.. here's really how:
var ngHtml2js = require('ng-html2js'),
fs = require('fs');
var filename = 'path/to/your.html';
var templateHtmlContents = fs.readFileSync(filename, 'utf8');
var templateJsCode = ngHtml2js(filename, templateHtmlContents);
var templateJsFile = 'your/template.js';
fs.writeFileSync(templateJsFile, templateJsCode);
Checkout src/ng-html2js.js file.
I suggest closing this issue too.