Description
In the current codebase, attempting to go to a state+params identical to your current state+params is a no-op. This is good and makes sense, since there's nothing meaningful to do to transition from your current state+params to your current state+params.
However if you attempt to go to a different state+params, such as by clicking on a ui-sref
, a transition is always created and ui-router starts resolving the necessary data. This causes a problem if the user tries to click the same ui-sref
twice or more - ui-router will queue up a bunch of identical transitions, waste time retrieving the same resolve data repeatedly, and take much longer to actually switch to the new state.
A request to transition to a state should therefore be ignored if either the requested state is exactly the current state or it is exactly the destination state for the current transition.