EmberJS: How to transition to a router from a controller's action

前端 未结 3 1993
迷失自我
迷失自我 2021-02-02 00:30

I have an action:

{{action create target=\"controller\"}}

which I have targeted to the bound controller (rather than the router) like this:

3条回答
  •  情深已故
    2021-02-02 00:59

    EDIT: Keep reading, Mike's answer discusses some of the problems with this approach.

    You can just call transitionTo directly on the router. If you are using defaults this looks like App.router.transitionTo('route', context).

提交回复
热议问题