Skip to content

Instantly share code, notes, and snippets.

@gabriel-dehan
Created November 30, 2012 15:37
Show Gist options
  • Save gabriel-dehan/4176488 to your computer and use it in GitHub Desktop.
Save gabriel-dehan/4176488 to your computer and use it in GitHub Desktop.
Ember.js Issue with double outlet rendering
<h1>Ember Comitters</h1>
{{outlet poney}}
{{outlet}}
Yeomantest.ApplicationController = Ember.Controller.extend();
Yeomantest.Router = Ember.Router.extend({
enableLogging: true,
root: Ember.Route.extend({
contributors: Ember.Route.extend({
route: '/',
showContributor: Ember.Route.transitionTo('contributor'),
connectOutlets: function(router) {
// If I comment this line, the contributors outlet is rendered only once, but if I let it as is, the contributors outlet is rendered twice.
router.get('applicationController').connectOutlet('poney', 'poney');
router.get('applicationController').connectOutlet('contributors', Yeomantest.Contributor.all());
}
}),
// [...]
})
}
Yeomantest.PoneyView = Ember.View.extend({
templateName: 'poney'
});
Yeomantest.ApplicationView = Ember.View.extend({
templateName: 'application'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment