I am currently working on a project that consists of multiple sections. Users are only able to interact with the application through internal navigation. However, if a user manually enters a URL and reloads the page, I want to be able to redirect them to a specific state or prevent them from doing so. How can I achieve this?
In my code, I have implemented validation based on the received state in my real project. But in this scenario, I am unsure of how to detect direct navigation via entering a URL into the browser's address bar.
$transitions.onSuccess({ }, trans => {
})