Add check to ns-router to maintain routing history when user triggers navigation but remains in the same place #885
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Currently when a user triggers navigation clearHistory is automatically triggered but this can lead to a user being trapped when the navigation path is one they are already on, effectively they do not move anywhere but the history is empty.
To fix this I made the following changes
ns-router-links
Added check to see if clearHistory is set to false - if it is it is because it has been set this way and therefore remains false
If it has not been set or is true a check is run to see if the current path and target path are the same
If they are then clearHistory is set to false to retain the history
Other changes
ns-platform-location
Fixed typo