Hi, I have quite a basic question but one I can’t seem to get right.
Basically I have a login page and once the user has logged in, they are redirected to a landing page via $state.go(‘app.landing’).
The issue is I don’t need it to remember where it came from as the user has been logged in and wouldn’t need to go back to the login page, e.g. dont show a back button. Whats the best way to achive this please?
Any help will be much appreciated
there are many ways to achieve this very common task … two things have worked for me …
use a modal for your login screen. that way you can open that modal whenever your app requires authentication. and it wouldnt be a state that the user can navigate to.
change hierarchy of your app:
first level : landing – login – app
thn you got the rest app.somescreen - app.anotherscreen
that way you can remove the show back button on the ‘app’ section. and it becomes completely unaware of other states.
Thank, will go with the modal approach