I'm using AngularJS to render my views and what not. This all works fine. But I now need to create a login page.
Normally my base layout has a top navbar and a side menu on the left and loads the body on the right side of the menu. Just like a typical admin dashboard: http://getbootstrap.com/examples/dashboard/
Now obviously when you're not logged in then you shouldn't be able to see the left menu and the top nav bar.
I could "hide" them with a ng-if="$root.isLoggedIn". Actually, that's what I have now. But when you load the page then you see all the menus for a split second. It then flashes away because that's when AngularJS is done loading and parsing the DOM.
Not really a pretty view if you ask me.
So how do others solve this problem? Is there a way to have a login page that uses a different base layout?
ng-cloak. Also, reverse the logic behind thatng-if. Hide the menu by default, only show it if logged in.