I am trying to get Ember working in an existing Rails app, so install the ember-rails gem. It gave me a app.js based on this generator template that contains
var router = App.router = App.Router.create({
enableLogging: true,
location: 'hash'
});
App.initialize(router);
I also wanted to use ember-data, and saw some posts saying edge is the only way to go with that. So so updated both ember-data and ember.js itself to edge.
So when I run this, I get Uncaught TypeError: Cannot call method 'create' of undefined on the App.Router.create line.
I’m guessing that the API has changed and this is obsolete, but can’t find the current canonical way of creating this router object.
The examples here are canonical AFAIK: http://emberjs.com/guides/outlets/
…except that
Ember.Stateshould beEmber.Routenow. But this is what you want to do: