# Custom directive using ion-view inside is not updating nav bar

**URL:** <https://forum.ionicframework.com/t/custom-directive-using-ion-view-inside-is-not-updating-nav-bar/86727>\
**Category:** ionic-v1\
**Created:** [April 16, 2017, 10:10pm UTC](https://forum.ionicframework.com/t/custom-directive-using-ion-view-inside-is-not-updating-nav-bar/86727 "2017-04-16T22:10:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikasg](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vikasg](https://forum.ionicframework.com/u/Vikasg)\
**Post date:** [April 16, 2017, 10:10pm UTC](https://forum.ionicframework.com/t/custom-directive-using-ion-view-inside-is-not-updating-nav-bar/86727/1 "2017-04-16T22:10:11Z")

</div>

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](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.

Edit:-  
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.
