I have different buttons (one for creating a 'sprint', another for creating a comment, etc). The forms for doing these tasks are appended to a modal dialog that is displayed when you click on the different buttons.
These are the flows:
click on "Sprint" button > append "Sprint" form > show the modal
then if you click on other button:
click on "Comment" button > empty modal content > append "Comment" form > show the modal
Currently, the different content is saved in a string and it is appended to the modal when you click the button.
But now I'm using Backbone and Underscore templates, and I can't figure out how to do the same thing. I don't want to have all the templates inside the modal and show them depending on the button you clicked; I want to append an already cached template on click.
Is there a way of doing this with Backbone and Underscore?