In Backbone.js you can use the Router to bind to # changes to navigate around a single-page HTML5 app.
Is there an equivalent for Ember.js? Or have I missed something fundamental about its design?
In Backbone.js you can use the Router to bind to # changes to navigate around a single-page HTML5 app.
Is there an equivalent for Ember.js? Or have I missed something fundamental about its design?
There are plans to write a router for Ember. It will likely be integrated with the Ember StateManager. For now, you can use sproutcore-routing or another routing solution. I'm currently using sproutcore-routing successfully, but it has some limitations.
You may also want to have a look at Ember RouteManager
Take a look at that Anatomy of a Complex Ember.js App Part I: States and Routes and ember-routemanager.
You might want to check this out: https://github.com/emberjs-addons/sproutcore-routing
I'd imagine this has been left out to keep things "loosely coupled". You could use a self-contained alternative, for instance Sammy or http://davisjs.com/.
Sproutcore-Statechart (for Ember) also has routing support now: https://github.com/emberjs-addons/sproutcore-statechart
As of Ember 1.0, Ember has a built-in first-class Router.