I am trying to prompt the user with a modal that requires the confirmation of his/her password, before the transition to a given route (in this case my App.UserSettingsRoute). I've got this to work generally (I'm opening the modal and aborting the transition in the beforeModel hook, and resume the transition when the password is confirmed), but I'm facing the following problem:
When the user enters the route directly (by typing in the URL in the address bar directly or by refreshing the browser while in the route), I cannot open the modal (I get an error) because I have not yet entered any route yet - this is the first route being entered in the application. My question: How can I detect that the current route I am entering is the first one? Alternatively, is there a better approach for this?