I am currently utilizing angular1
in conjunction with browserify
and grunt
to construct my application. At present, browserify
only bundles the controllers and retrieves the templates using ng-include
through a separate ajax call.
Due to the excessive amount of ajax calls being made, I am looking to bundle the templates together with the JavaScript code. To achieve this, I am employing grunt-processhtml
to combine the output from browserify
into my html
. My query pertains to how I can produce an output similar to:
<script type="text/ng-template" id="/templates/*.html">
# Template content
</script>
Here, the asterisk *
serves as a wildcard representing all files within the templates
directory, each containing the respective file's content. Your assistance on this matter is greatly appreciated. Thank you in advance!