I have created a web app where the user needs to login first.
When i type the url in the address bar and press enter, i first see the contents of my index page that is the navigation bar ,interpolation code where i bind data if the user is logged in and after that it is redirected to my login page since the user is not logged in.
Is there a way to load my login page first or just hide the contents of index page till the validation for whether the user is logged in is done.
for Example: i enter localhost:3000 in the address bar
see
Welcome {{authentication.userName}}
in my nav bar.
After the validation of authentication function it is redirected to login page.
I have tried using ng-cloak but it does not work.
Or should i make login page as index.
how you used ng-cloak, for example if I want to hide and show the anchor tag as below I'll use ng-cloak as
add following css for ng-cloak
hope it'll solve your problem , just add css in the file or template and use ng-cloak with css in tag where you want to hide and show.