1

I am trying to hide and show bottom navigation bar for nativescript angular app in both ios and android for specific pages of app. Using basic one that gets created by nativescript angular. Bottom navigation used https://docs.nativescript.org/angular/ui/ng-components/bottom-navigation steps: tns create my-app select angular then select tabs view app for sample app.

Then run the app. Replicate issue: Basic tabs view app created by tns create command has home page with list of item. when you tap on a item navigates to item detail page.

On Item detail page I want to hide bottom navigation bar. Once user uses back navigation action to go back to home page the navigation bar should shown as normal.

Thanks in advance for help....

  • It sounds like you're targeting the wrong router. When you target the inner router of the bottom navigation, it will navigate the contents within. If you target the page router, you'll navigate to a new screen without the bottom navigation. – Ian MacDonald May 29 '20 at 21:09
  • I agree with Ian. But at the same time I have come across requirements where you have to hide it specifically in some page. There is no out of the box solution but you can do it natively. [Here](https://play.nativescript.org/?template=play-js&id=9dlMNH&v=3) is a sample I wrote for TabView a while ago, I think it should work for BottomNavigation too. – Manoj May 30 '20 at 01:15
  • Thanks for the immediate response.... I am new to nativescript angular development...Manoj I couldn't implement your example in angular nativescript looks like your example is using .js,.xml I think that's reactjs.. can you please provide example for Angular nativescript... Hi, Ian I was not able to exactly implement the logic as you explained... As I told earlier I am new to this... Can you please provide sample code.... That would really helpful... and does this way has lazy loading... Thank you in advance... – simple-access May 31 '20 at 02:07
  • Hi manoj, I came across your suggestion in the link https://stackoverflow.com/questions/53570899/hide-tab-buttons-on-nativescript-angular-tabview/53570961#53570961 I was not able to access BottomNavigationBar and Tabs is not exposed like TabView.. So i was not able to use this solution... Is there any other solution to get it... I want to both hide and show... – simple-access Jun 01 '20 at 15:18

0 Answers0