I have a base view and a subview, each with its own template. I want to add a subview, but in a specific div inside the current view.
These are my view and subtitle templates:
<script type="text/template" id="containerTmpl"> <div id="container"> <div id="inner-container"> </div> </div> </script> <script type="text/template" id="photoTmpl"> <img src="<?- url ?>" alt="" /> </script>
What I want to do, when I add photoTmpl to includeertmpl, I want to add it inside the inner container. Currently in spine mode when i say
this.$el.append(view.render().el);
It empties the contents of the div container and replaces it with a divText.
source share