From my understanding, nav-clear only clears when you click the element with the nav-clear directive on it.
The link to “Sub” doesn’t have the nav-clear, so it shouldn’t be clearing the nav history as far as I know.
Also, removing the nav-clear from the menu options creates other issues.
I have updated my codepen to be closer to what I am trying to achieve, and only have a nav-clear on the “Account” menu item to highlight the issue I am having:
So, first with leaving the nav-clear on the “Account” menu item to replicate the above problem:
Open menu
Click “Account”
Click “Account Sub”
Notice the “Back” button
Click “Back”
Open menu
Click “One”
Open menu
Click “Account”
Click “Account Sub”
Notice the “Back” button is now missing
So, now with the nav-clear removed from the “Account” menu item which fixes the above issue but creates another:
Click “Go To Sub Tab 1”
Open menu
Click “Account”
Notice how “Back” is there when it shouldn’t be
As far as I know the menu items should clear the nav, which is why the nav-clear directives were added to them (also all the examples I see of the slide menu put nav-clear on the menu items, so now I am confused as to what is the correct way to do side menus and clear the history)