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: enter image description here

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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -