Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Backbone Initialize vs Render


var myView = Backbone.View.extend({initialize: function(){

console.log("I am initialized");

},
render: function()
{
 console.log("I am rendered");
}

});

const myview = new myView();

/*initialize will execute when you create an instance of the view*/
/*render will not execute unless you this.render()/myview.render() execute it*/

/*if you want you can also call myview.render();
myview.initialize();
*/
 
PREVIOUS NEXT
Tagged: #Backbone #Initialize #Render
ADD COMMENT
Topic
Name
7+3 =