Can anyone help me with this view issue that I have. This is a hypothetical example so there is no code to see.
So say I have a site simple site with three routes
/signin
/users
/users/:id
I hit the sign-in route (/signin) and the sign-in view is inserted into <ng-view> in the index.html. The sign-in view is a simple form with username and password.
After a successful sign-in I arrive at the user list view (/users), which contains say a header, footer, left-side-nav and the user list as the main content in the middle.
I then click on a user in the list and I’m taken to the user detail page (/users/:id). The problem I have now is i only want to update the main content. I dont want to keep inserting the header, footer and left-nav into the view. So to get around that I could do this in my index.html
<header/>
<left-nav/>
<div ng-view></div>
<footer/>
Now when I change routes only the main content changes but the issue I have now is if I return to the signin screen it now contains a header, footer and nav that I dont want.
This ideally what I want.
- Go to sign-in page.
- Sign-in view gets inserted.
- Successful sign-in.
- User list view gets inserted. Contains header, footer, nav and main content containing user list.
- Click on user in list.
- User detail page is displayed in main content. Header, footer and nav remain static.
How do I make this work without some hooky fix?