ember.js - EmberJS nested subroute custom index path not working as expected -
i'm following one of ember guides on routing (v2.14.0) , i'm trying set nested sub-route index route should redirect different subroute.
router.map(function() { this.route('about'); this.route('dashboard', function() { this.route('index', { path: '/dashboard/calendar'}); // ^should direct dashboard index requests dashboard/calendar right? // setting path = '/calendar' doesn't work this.route('calendar'); this.route('daily-journal'); }); });
however when load http://localhost:3000/dashboard
, error:
any ideas did wrong?
it dashboard/dashboard in case - think.
if want redirect route / dashboard - can use redirect route: https://guides.emberjs.com/v2.14.0/routing/redirection/
you put in dashboard route
import ember 'ember'; export default ember.route.extend({ beforemodel(/* or whatever */) { this.transitionto('calendar'); } });
Comments
Post a Comment