Nav Bar Bug? Or am I doing it Wrong?

Here is an example of what I have:

When the example opens, click "Sub"
Notice how the nav bar has a back button, and you can go back.

Now, open the menu, and click "One"
Open the menu again, and click "Home"
Now click "Sub"
Notice how there is no back button.\

Is this something to do with the way I am doing things? Or is this a bug?

It’s all the nav-clear directives you have on your links. Just removed them and things work fine.

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:

  1. Open menu
  2. Click “Account”
  3. Click “Account Sub”
  4. Notice the “Back” button
  5. Click “Back”
  6. Open menu
  7. Click “One”
  8. Open menu
  9. Click “Account”
  10. Click “Account Sub”
  11. 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:

  1. Click “Go To Sub Tab 1”
  2. Open menu
  3. Click “Account”
  4. 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)

@mhartington @andytjoslin any ideas?

edit: guess I can’t mention people who haven’t replied yet. Oh well…maybe andy will see this anyway…

I think there is an issue here, so I created one on github: