I want to show same view on reload or F5 press

I have two pages in my application “index” and “tools”

when i am on https://localhost:44310/#/tools

on hitting of F5 directing back to https://localhost:44310/#/tools

how to solve this ?

Hi @Amitprakash, welcome! Unfortunately I think you’ll have to provide some more details about your situation. The Ember router is built so that a refresh should (if things are wired up correctly) render the same view again by default. The URLs that you posted are both the same, is that not what you want?

I have two pages in my application “index” and “tools”

when i am on https://localhost:44310/#/tools

on hitting of F5 re-directing back to https://localhost:44310/#/index

how to solve this ?

below are code for toolsRouter.js

App.toolsRoute = Ember.Route.extend({ redirect: function () { debugger; // this redirects / to /dashboard this.transitionTo(’#/tools’); }, model: function (params) {

},
redirect: function () {
    debugger;
    this.Route('tools')
},
afterModel: function (resolvedModel, transition) {
    var _this = this;
    transition.then(function () {
        debugger;
        App.CurrentURL = '#/' + _this.get('router.url');
    });
},


serialize: function (model) {
    return model;
},
actions: {
},
setupController: function (controller, model) {
    controller.set('model', model);
}

});

Code for indexRouter.js

App.indexRoute = Ember.Route.extend({ model: function (params) {

},
afterModel: function (resolvedModel, transition) {
    var _this = this;
    transition.then(function () {
       
        App.CurrentURL = '#' + _this.get('router.url');
    });
},
serialize: function (model) {
    return model;
},
actions: {
},
setupController: function (controller, model) {
    controller.set('model', model);
}

});

hi @dknutsen please look into details i have provided below