Let's say you have a template as follows that you want to use with underscore
<script type="text/template" id="error-dialog-template" >
<div class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>{{ title }}</h3>
</div>
<div class="modal-body">
{{ message }}