Ember.js: transitionTo route, then to dynamic segment

前端 未结 5 1224
北荒
北荒 2021-02-01 07:45

I have a Router set up with accounts, and account/:account_id options. When the user lands on the index page of my app I transition them to the accounts route.

S         


        
5条回答
  •  难免孤独
    2021-02-01 08:29

    With latest Ember (1.0.0-RC-6), this works perfectly.

    Router:

    this.resource('accounts', function () {
        this.resource('account', {path: '/:account_id'});
    });
    

    To redirect:

    this.transitionToRoute('account', Social.Account.find(1))
    

提交回复
热议问题