documentcloud/backbone — Issue #899: Initial page load route trigger
Author: html5anchor
Created: 2012-01-29 20:54:59+00:00
State: open

I'm trying to get a grip on Backbone and the one thing that confuses me are the routes.

With the following code:

var Router = Backbone.Router.extend({
routes: {
'index.html': 'hello',
},

hello: function() {

alert('hello');
},
});

var router = new Router;

Backbone.history.start({
pushState: true,
root: '/app/',
});

Shouldn't the hello function get triggered if I go to `http://localhost/app/index.html`?
Or am I doing something wrong here?