As a newcomer to angularJS, I am learning that it is typically designed for Single Page Applications. Most example logins I come across define the index.html as the main page, with the ng-view portion contained within.
However, in my situation, the Login page and the index page are one and the same. When accessing the root context, users arrive at login.html. After successfully logging in, they are directed to homepage.html. This homepage includes a Logo, Top Banner, Left Navigation, and a content section. Different templates will be displayed within the content section, offering various views like dashboard, enquiry form, and reports. It makes more sense for me to designate homepage.html as the main shell page, as all other views will be integrated within it.
The issue arises when trying to redirect from the login page to the homepage, which serves as the shell page. Traditional methods seem to lock in the login.html as the shell, preventing redefinition.
<body ng-app></body>
Another approach involves creating a blank shell page and treating the entire login form as one view, with each additional template (e.g. dashboard.html, enquiry.html, reports.html) also as separate views. However, this approach leads to code duplication for items like top banner and navigation in each template, negating the benefits of a Single Page Application.
Is there a way to accomplish this seamlessly? A practical example would be greatly appreciated for clarification.