EmberJS의 component에서 transition 처리 하기

출처: stackoverflow

// component.js
import Ember from 'ember';

export default Ember.Component.extend({
    actions: {
        submit: function () {
            this.get('router').transitionTo('some.target.route.name');
        }
    }
});
// initializer.js

export function initialize(application) {
    application.inject('component', 'router', 'router:main');
};

export default {
    name: 'component-router-inject',
    initialize: initialize
};