github.com/outbrain/consul@v1.4.5/ui-v2/app/routes/index.js (about) 1 import Route from '@ember/routing/route'; 2 import { inject as service } from '@ember/service'; 3 import { hash } from 'rsvp'; 4 import { get } from '@ember/object'; 5 6 export default Route.extend({ 7 repo: service('repository/dc'), 8 model: function(params) { 9 return hash({ 10 item: get(this, 'repo').getActive(), 11 }); 12 }, 13 afterModel: function({ item }, transition) { 14 this.transitionTo('dc.services', get(item, 'Name')); 15 }, 16 });