I need a client-side javascript template engine that supports loading partials from files. That's because I have a template with an unordered list. It has 2 types of list items (that means, for example, one li tag has a text input while another one has a text input and an image).
I now want to be able to use these list item templates in different template files without having to copy/paste them.
I used doT.js partials until now, but to be able to use a partial, it has to be declared in the same file. Therefore, I had to copy the snippets to each template file and when I made a change to how one of the li templates was structured, I had to change it in all files.
I want to avoid that. Is there anything I could use?
I'm planning on using the template with a require.js plugin if available.