mardi 22 septembre 2015

Last route is always called

I have two routes as following (in router.js).

this.resource('records', function() {
    this.route('edit', {path: '/:id'});
    this.route('delete', {path: '/:user_name'});
});

when I refreshed the page when i was in edit route. But the page is loaded with the delete route.

If i have the routes as following,

this.resource('records', function() {
    this.route('delete', {path: '/:user_name'});
    this.route('edit', {path: '/:id'});
});

Now if i refresh the page, when i am in delete route, the page would load with edit route.

When i press the browser back button also same problem occurs. The last route in a resource is called. But I want it to be loaded with the same route that I was in earlier.

Anyone had encountered this problem? If so please help me in this. Thank you




Aucun commentaire:

Enregistrer un commentaire