import Route from 'consul-ui/routing/route';
import { get } from '@ember/object';
export default class RoutingRoute extends Route {
model() {
const parent = this.routeName
.split('.')
.slice(0, -1)
.join('.');
return this.modelFor(parent);
}
afterModel(model, transition) {
if (!get(model, 'chain')) {
this.replaceWith(parent);
setupController(controller, model) {
super.setupController(...arguments);
controller.setProperties(model);