My question is quite simple and needs no special explanation.
In Durandal, is it possible to control whether or not to use transition when switching from/to a viewmodel?
The reason why I want to be able to deactivate the animation is as follows:
I have a search form module quicksearch.js
in my shell/masterpage that is accessible from anywhere. What it does is validate the input and then simply redirect to the results page results.js
passing the search parameters in an URL after hash. The results.js
takes care of querying the server.
When the quicksearch.js
module is used while on a page other than results.js
, the animation is triggered and it's desired behavior. However, when on results.js
and using quicksearch.js
, the only thing that changes in URL is the parameter string (module name right after the hash is left unchanged). Still, this goes through all the lifecycle of activating results.js
again, with animating from results.js
to results.js
and that looks pretty bad.
So, is there any way to, under a condition, prevent Durandal from animating the content and just compose and bind the view?