samedi 25 juin 2016

Redirect to child route from parent route in Emberjs

How can I redirect to a child route from a parent route in Ember?

Currently, my router.js is:

Router.map(function() {
  this.route('landing-page', { path: '/' });
  this.route('users', function() {
    this.route('user', {path: ':id'});
    this.route('all');
  });
});

I want to redirect to users/all route from the users route.

I've tried using this.route('users', { path: 'all'}, function() {... but it doesn't work and shows UnrecognizedURLError: /users/.




Aucun commentaire:

Enregistrer un commentaire