Login page without sidebar/header/quickSidebar within same angular app
July 13, 2017 at 12:04 pmPosts: 8Member Reply #10302
I am using Angular JS and started from the index.html page that is in admin_1_angularjs.
It all works really well (apart from the sidebar, see other post on the topic) but I wanted to integrate one of the login page that is available in the theme without the sidebar/header/quickSidebar. A completely separate page.
The way I tried to do it was to create abstract angular UI states called private and public and have the login state derived from public, and the other states derive from private. I started by simply using <ui-view/> as the template for both the private and public abstract states and keep sidebar/header/quickSidebar in index.html. It works well like that, i.e. by default a user not connected is lead to the login page and upon authentication it goes to the dashboard. That works really well but obviously the sidebar/header/quickSidebar are still on the login page.
From there I tried to replace the content that is in index.html between <!– BEGIN PAGE SPINNER –> and <!– END QUICK NAV –> (i.e. everything within the body tag except the script tags) by a single <ui-view/> tag and move that content to the template of the private state.
Suddenly the dashboard does not display anymore and instead I have the blank screen attached.
It must have something to do with the order of execution of controllers or scripts but I am struggling to figure out what the problem is. I was wondering whether you could share any idea / insight / lead on this issue?
Thank you very much for your help,
Didier Le Floch
Attachments:You must be logged in to view attached files.
July 15, 2017 at 12:23 pmPosts: 4472Support Staff Reply #10306
In your case you can try to separate the login page from the after login pages and upon successful login you can redirect to the application page. You can refer to below links to get started:
July 17, 2017 at 4:49 pmPosts: 8Member Reply #10317
Hi, thanks for the answer but I know how to do a login page with AngularJS and it works perfectly.
My only problem is that although the HTML code of header, footer, etc. is in my page once logged in, it does not appear and I get a blank page attached in my previous post instead.
There must be something that keeps all those components hidden despite the HTML code being in the page,
It’s a technical question that requires a precise technical answer rather than general guidelines,
July 17, 2017 at 4:51 pmPosts: 8Member Reply #10318
Just to be clear header, footer, sidebar, theme panel and quick sidebar do not appear, whereas they are in the HTML code.
July 17, 2017 at 5:27 pmPosts: 8Member Reply #10319
I removed the page-header class in the header and it appears,
So clearly somewhere there is a code that make page-header visible / invisible,
And the same goes for the other includes,
July 17, 2017 at 6:23 pmPosts: 8Member Reply #10320
page-on-load and ng-spinner-bar was the answer
You must be logged in to reply to this topic.