AngularJS and ionic. Buttons in the header, tab

I am all new to Ionic, and this is my first project. I am creating a small application with a navigation insert at the bottom.

The view of one tab is as follows:

<ion-view title="Account"> <ion-content class="has-header padding"> <h1>Account</h1> </ion-content> </ion-view> 

I want to add a button to the header next to the account, and according to the documentation you use the ion-nav-bar elements, but when you try this, nothing appears. Can someone let me know how to add buttons to the title as a tab?

+6
source share
1 answer

You can use the ion navigation button as follows:

 <ion-view title="Account"> <ion-nav-buttons side="left"> <button class="button" ng-click="doSomething()"> I'm a button on the left of the navbar! </button> </ion-nav-buttons> <ion-content class="has-header padding"> <h1>Account</h1> </ion-content> </ion-view> 

Example 1 Example 2

+20
source

Source: https://habr.com/ru/post/971908/


All Articles