Home > DeveloperSection > Forums > how to show “hello world” backbone-marionette.js?
ezra heywood
ezra heywood

Total Post:145

Posted on    January-28-2015 10:19 PM

 ASP.Net JQuery  JavaScript  Backbonejs 

 1 Reply(s)
 916  View(s)
Rate this:

I am trying to trying a view using backbone +backbone-marionette.js..But I am able to get alert in route .But I want to display a view .But I am not able to display my template ?could you please tell me how to show my first view in angular

var firstpage = Backbone.View.extend({



Kamlakar Singh
Kamlakar Singh

Total Post:28

Posted on    January-28-2015 10:44 PM

There are many things you have to look at, to display that simple message.

this will initiate the router on document ready.


    $(document).ready(function () {

    router = new routers();



Now in router function we will initialize our View and append it to body


     var fView = new firstpage(); // view initialized



el contains all the events and html , read about it here

For this to work we have to set some html to el of view on initialize

var firstpage = Backbone.View.extend({

template:_.template("<h1>Hello World<h1>"),





Don't want to miss updates? Please click the below button!

Follow MindStick