# How to adding navigation bar button having ionic-on/ ionic-off functionality

**URL:** <https://forum.ionicframework.com/t/how-to-adding-navigation-bar-button-having-ionic-on-ionic-off-functionality/21611>\
**Category:** uncategorized\
**Created:** [April 24, 2015, 7:26am UTC](https://forum.ionicframework.com/t/how-to-adding-navigation-bar-button-having-ionic-on-ionic-off-functionality/21611 "2015-04-24T07:26:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RahulSalvikar](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rahulsalvikar/32/73870_2.png) [@RahulSalvikar](https://forum.ionicframework.com/u/RahulSalvikar)\
**Post date:** [April 24, 2015, 7:26am UTC](https://forum.ionicframework.com/t/how-to-adding-navigation-bar-button-having-ionic-on-ionic-off-functionality/21611/1 "2015-04-24T07:26:03Z")

</div>

I want to add star button on navigation bar and when user press on this, the button show selected icon and next time is press it show unselected.  
I tried it by using ionic-on and ionic-off but I can’t make it.

---

<div class="post-metadata">

**Author:** ![rajeshwarpatlolla](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rajeshwarpatlolla/32/70759_2.png) [@rajeshwarpatlolla](https://forum.ionicframework.com/u/rajeshwarpatlolla)\
**Post date:** [July 28, 2015, 5:20pm UTC](https://forum.ionicframework.com/t/how-to-adding-navigation-bar-button-having-ionic-on-ionic-off-functionality/21611/2 "2015-07-28T17:20:52Z")

</div>

If you still have this issue, could you please add a plunker or codepen? Just to get some idea, what exactly you are trying to achieve?
