---
title: "how to show “hello world” backbone-marionette.js?"  
description: "how to show “hello world” backbone-marionette.js?"  
author: "Anonymous User"  
published: 2015-01-28  
updated: 2015-01-28  
canonical: https://www.mindstick.com/forum/12912/how-to-show-hello-world-backbone-marionette-js  
category: "asp.net"  
tags: ["jquery", "javascript", "backbonejs"]  
reading_time: 1 minute  

---

# how to show “hello world” backbone-marionette.js?

I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to trying a [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) using backbone +backbone-marionette.js..But I am able to get [alert](https://answers.mindstick.com/qa/30927/what-is-an-alert) in [route](https://www.mindstick.com/interview/396/what-is-routed-event-in-wpf) .But I want to display a view .But I am not able to display my [template](https://www.mindstick.com/blog/282/creating-custom-template-in-joomla) ?could you please tell me how to show my first view in [angular](https://www.mindstick.com/articles/13081/advantages-disadvantages-of-angularjs-is-that-ideal-for-your-project)

[var](https://www.mindstick.com/forum/33920/what-is-different-var-and-dynamic-types-in-c-sharp) firstpage = Backbone.View.extend({

template:"template/firstpage"

})

## Replies

### Reply by Mark M

There are many things you have to look at, to display that simple message.

this will initiate the router on document ready.

```
<script>   
$(document).ready(function () {    router = new routers();   
Backbone.history.start();})
```

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

```
showFirstPage:function(){     var fView = new
firstpage(); // view initialized     $('body').append(fView.el);      }
```

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>"),initialize:function(){    this.$el.html(this.tempalte());}}) 
```


---

Original Source: https://www.mindstick.com/forum/12912/how-to-show-hello-world-backbone-marionette-js

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
