As, I was refactoring my code, I saw that I had some html templates (more or less same) at different views. So I tried making a custom directive so that I could avoid duplication. But then I saw ion-view, ion-content wasn’t behaving same as usual.
I have setup a plnker here :- https://plnkr.co/edit/ArcLKhsJrwDlJuNxpxYA?p=preview
This plnkr has two buttons for each tab with different Id. First button (uses my-view directive) won’t update navbar (ie. showing back button and changing header) but second button does. Please let me know the correct way to correct my directive and markup.
I tried to get to the reason of why it isn’t working and have a feeling that ion-view inside a my-view directive don’t have direct access to its Required parent (as the doc says) ie. ion-nav-view. But I guess - there could be a workaround, if you experts could tell me.
As Blue button tabs don’t have back button when you try plnkr. You can use alt + left arrow keys to get back to home.
Thanks in advance.