I am saving all the HTML templates to a single file. This file contains a loads of templates (more than 50).
<script type="text/html" id="template-1">
<p>Template 1</p>
</script>
<script type="text/html" id="template-2">
<p>Template 2</p>
</script>
I need to load the templates to js variable.
I have looked at JQuery load method but it loads the template to attach it to DOM which is not i need here.
Any JQuery or AngularJS solution will work for me.