Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Sidemenu & Tabs Together?

$
0
0

Ok I think I've worked it out after studying both examples :smile:

It took me a few days of stripping down the conference app to the barebones to understand what was going on better (just 2 tabs, basic JSON master / detail pattern). Then studying the sidemenu example and trying to add some of those components. I don't have time to upload it just yet but I might try and upload it onto the Ionic Market if it's allowed (not sure what the rules are if using some existing code from some of the example apps??)

Basically what you have to do is add the hello-ionic and list imports into your app.js of the conference app like this:

import {HelloIonicPage} from './hello-ionic/hello-ionic';
import {ListPage} from './list/list';

Then in your app.html you need to add this:

<ion-nav id="nav" [root]="root" #content swipe-back-enabled="false"></ion-nav>

<ion-menu [content]="content">

  <ion-toolbar>
    <ion-title>Pages</ion-title>
  </ion-toolbar>

  <ion-content>
    <ion-list>
      <button ion-item *ng-for="#p of pages" (click)="openPage(p)">
        {{p.title}}
      </button>
    </ion-list>
  </ion-content>

</ion-menu>

<ion-overlay></ion-overlay>

:smile:


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>