You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started looking into replacing it but it seems quite involved.
The text was updated successfully, but these errors were encountered:
microfauna
changed the title
Ember 2.10.0+ migration to glimmer / removal of ember-handlebars breaks outlet keyword.
Ember 2.10.0+ migration to glimmer / removal of ember-handlebars breaks outlet keyword.
Dec 13, 2016
I got started on a basic hack to get this working - it's surely not the best way to go about it and still needs to load parent model, target and have an "into" specified - but it's a start, no?
Ember.Route.reopen({
controllerFor(name, _skipAssert) {
let owner = Ember.getOwner(this);
let route = owner.lookup(`route:${name}`);
let controller;
if (route && route.controllerName) {
name = route.controllerName;
}
controller = owner.lookup(`component:${name}`);
if (!controller) {
return this._super.apply(this, arguments);
}
return controller;
},
render(_name, options) {
let name;
console.log(this.templateName, this.routeName, options);
if (typeof _name === 'object' && !options) {
name = this.templateName || this.routeName;
options = _name;
} else {
name = (_name && _name.replace(/\//g, '.')) || this.routeName;
}
let templateName = "components/" + (this.templateName || name);
let owner = Ember.getOwner(this);
let into = options && options.into && options.into.replace(/\//g, '.');
let outlet = (options && options.outlet) || 'main';
let controller = owner.lookup(`component:${name}`);
if (!controller) {
this._super.apply(this, arguments);
} else {
let template = owner.lookup(`template:${templateName}`);
console.log(Ember.Route.parentRoute(this));
let renderOptions = {
owner,
into,
outlet,
name,
controller,
template,
ViewClass: undefined
};
this.connections.push(renderOptions);
Ember.run.once(this.router, '_setOutlets');
}
}
});
I started looking into replacing it but it seems quite involved.
The text was updated successfully, but these errors were encountered: