Even though I am only intending to show the bootstrap modal on page load, it is triggering every time the route changes. For example, if I return to the same page from another page using the browser's back or forward buttons, the modal is shown again. While showing on page reload is acceptable, it is not desirable for it to appear on route changes as well. I have tried various solutions found online, but none have worked for me. It seems like a common issue, but the other suggestions have not resolved the problem. I attempted to hide the modal using the onroutechangestart event, but it still persists. How can I prevent the modal from showing on route changes? Any assistance would be greatly appreciated.
angular.element(document).ready(function () {
$scope.showModal = true;
});