Skip to content
Jesper Lindström edited this page Jun 8, 2014 · 1 revision

Views are located in app/views/*.html and contain Handlebars templates. Below is a view that together with the controller, would output "Hello, my name is Jesper" to any element with id="main".

Controller:

app.core.router.get('/page', function() {
   // Render the view app/views/page.html and output it at #main
   app.core.view.render('page', { name: 'Jesper' }, '#main');
});

View (page.html):

Hello, my name is {{name}}
Clone this wiki locally