<script type = "text/javascript">
var ViewDemo = Backbone.View.extend ({
tagName: "div",
template: _.template($("#helloWorld").html()),
initialize: function(){
this.render();
},
render: function(){
this.$el.html(this.template({name: 'Tutorialspoint...!'}));
}
});
var myContentView = Backbone.View.extend({
el: "#myContent",
initialize: function()
{
const vd = new ViewDemo();
this.$el.html(vd.template({name:"HI WORLD"}));
}
})
var myview = new ViewDemo();
var myContent = new myContentView();