Posts EmberJS의 component에서 transition 처리 하기
Post
Cancel

EmberJS의 component에서 transition 처리 하기

출처: stackoverflow

1
2
3
4
5
6
7
8
9
10
// component.js
import Ember from 'ember';

export default Ember.Component.extend({
    actions: {
        submit: function () {
            this.get('router').transitionTo('some.target.route.name');
        }
    }
});
1
2
3
4
5
6
7
8
9
10
// initializer.js

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

export default {
    name: 'component-router-inject',
    initialize: initialize
};
This post is licensed under CC BY 4.0 by the author.

홀로 막걸리

무척 이른 출근길

Comments powered by Disqus.