dimanche 20 août 2017

EmberJS nested subroute custom index path not working as expected

I'm following one of the Ember Guides on routing (v2.14.0) and I'm trying to set up a nested sub-route where the index route should redirect to a different subroute.

Router.map(function() {
  this.route('about');
  this.route('dashboard', function() {
    this.route('index', { path: '/dashboard/calendar'});
    // ^should direct all dashboard index requests to dashboard/calendar right?
    // setting path = '/calendar' also doesn't work

    this.route('calendar');
    this.route('daily-journal');
  });
});

However when I load up http://localhost:3000/dashboard, I get this error: enter image description here

Any ideas what I did wrong?




Aucun commentaire:

Enregistrer un commentaire