I've got a view that has a named outlet inside of it. This view is not associated with a controller and cannot be for my use case. I seem to be unable to render into that named outlet. How would I correctly target it?
If the view is named App.UnassociatedView, the named outlet is {{outlet potatoOutlet}}, and the controller and view that I wish to associate are App.PotatoController and App.PotatoView respectively, how do I make this work?
I've tried
App.ApplicationRoute = Ember.Route.extend({
renderTemplate: function() {
this.render();
this.render('potato', {outlet: 'potatoOutlet', controller: this.controllerFor('potato')});
}
});
This
App.ApplicationRoute = Ember.Route.extend({
renderTemplate: function() {
this.render();
this.render('potato', {outlet: 'potatoOutlet', controller: this.controllerFor('potato'), into: 'application'});
}
});
And This
App.ApplicationRoute = Ember.Route.extend({
renderTemplate: function() {
this.render();
this.render('potato', {outlet: 'potatoOutlet', controller: this.controllerFor('potato'), into: 'unassociated'});
}
});
Here is a js fiddle: http://jsfiddle.net/wmarbut/X8Mu4/
Edit for clarity
I had this in my comment text in the fiddle, but forgot to put it here. Moving the outlet into the root level isn't an option for me b/c the goal of this is to have the UnassociatedView actually generate outlets at page load time. My code to make the outlets actually works, I just can't connect them.