Open javoire opened 8 years ago
Currently it's exporting the filename:
var src = ngHtml2Js(fileName, content, opts.module, 'ngModule') + '\nmodule.exports = "' + fileName + '"';
Exporting the name of the module allows you to do this:
angular.module('myApp', [ require('./templates/home.html') ]) // or var homeTemplate = require('./templates/home.html') angular.module('myApp', [ homeTemplate ])
You can still do this in most cases, but that's just because the module name and the filename usually is the same. It's not the case in the situation though: https://github.com/javoire/browserify-ng-html2js/blob/master/test/fixtures/output.js
Currently it's exporting the filename:
Exporting the name of the module allows you to do this:
You can still do this in most cases, but that's just because the module name and the filename usually is the same. It's not the case in the situation though: https://github.com/javoire/browserify-ng-html2js/blob/master/test/fixtures/output.js