Place client-side JavaScript templates in HTML or JavaScript?
Should client-side templates like the following (using underscore's templating engine): <p class="foo"><%= bar %></p> be placed in an separate HTML file, or a separate JavaScript file? I know it could work both ways. For example, a JavaScript file could just contain a list of string variables like so: var cute = '<p class="the"><%= unicorn %></p>'; var fb = '<p class="new-design"><%= sucks %></p>'; But I have also seen the following: <script type="text/template" id="omg-template"> <span id="swag-name"><%= name %></span> </script> Just from a Separation of Concerns standpoint, where does the