Question

How would I implement a refresh button in durandal? Is there something like this that works in a generic way? I would like to implement this on many pages.

return router.navigateTo(router.activeRoute());

Or do I have to reconstruct the url from the viewmodel?

Was it helpful?

Solution

I ended up using RainerAtSpirit's answer to implement a refresh button on the shell view. The code fragment is show here:

mainRefresh = function () {
            window.location.reload();
        },

I think I have an underlying issue in my app about sometimes the data not loading but I will save that for another question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top