Ionic navigation tab in title

I have a question about ion navigation,

The main navigation of my application is in the footer, but I want to add a tab of information to the header, I also want this tab to have its own look, so I set it as shown below.

 <ion-nav-bar class="bar-stable nav-title-slide-ios7">
  <ion-nav-back-button class="button-icon icon  ion-ios7-arrow-back">
    Back
  </ion-nav-back-button>
  <ion-nav-buttons side="right">
    <ion-tabs class="tabs-icon-top">

    <!-- Info Tab -->
    <ion-nav-view>
      <ion-tab title="Info" icon="icon ion ion-android-information" href="#/info/informatie">
        <ion-nav-view name="info-informatie"></ion-nav-view>
      </ion-tab>
     </ion-tabs>
    </ion-nav-view>


  </ion-nav-buttons>
</ion-nav-bar>

And I configured Angular routing to an abstract class like this,

.state('info', {
  url: "/info",
  abstract: true,
  templateUrl: "templates/tabs.html"
})

    .state('info.informatie', {
        url: '/informatie',
        views: { 
            'info-informatie': {
                templateUrl: 'templates/info-informatie.html',
                controller: 'InfoCtrl'
            }
        }
    })

Now, as far as I can tell, this should do the trick, but the problem is that the tab does not appear in the title, and when I am rigidly attached to the route, it remains on the same page without any error ...

I made templates and configured controllers.

I am new to Angular as well as Ionic, so this might be something pretty simple, but I can't figure it out. I read manuals and documents.

! ,

.state('info.informatie', {
        url: '/informatie',
        views: { 
            'TAB-OMGEVING': {
                templateUrl: 'templates/info-informatie.html',
                controller: 'InfoCtrl'
            }
        }

, , , , , , .

- ?

+4
1

, , , .

  • , nav-bar, nav-view , , html
  • ui-sref href..like <a ui-sref='info.informatie'>something</a> , , ui-sref.
  • u info.something, , - .
+2

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


All Articles