Skip to content

Instantly share code, notes, and snippets.

@joachimhs
Created June 9, 2012 10:38
Show Gist options
  • Save joachimhs/2900484 to your computer and use it in GitHub Desktop.
Save joachimhs/2900484 to your computer and use it in GitHub Desktop.
Ember Router
HS.router = Ember.Router.create({
rootElement: '#emberArea',
start: Ember.ViewState.extend({
route: "/",
setupControllers: function(manager) {
if (window.console) console.log('setupControllers: /');
},
view: Ember.View.extend({
templateName: 'linksTemplate'
})
}),
about: Ember.State.extend({
route: "/about",
setupControllers: function(manager) {
if (window.console) console.log('setupControllers: /about');
},
view: Ember.View.extend({
templateName: 'aboutTemplate'
})
})
});
@justinwalsh
Copy link

I was looking at your setupControllers and wondering how you are getting those called? I created some and they are not getting called when accessing the route. Any ideas? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment