Login before home page


I would like to make a simple login before to go HomePage using service providers ?


In your app.component.ts check if you have a valid token. If you don’t set the rootPage to whatever you want to call it, like ‘Login’.

When the user successfully logs in, save the token and set your page to the ‘homePage’…