import { Page1 } from ‘…/page1/page1’;
import { Page2 } from ‘…/page2/page2’;
import { CartPage } from ‘…/cart/cart’;
@Component({
templateUrl: ‘tabs.html’
})
export class TabsPage {
// this tells the tabs component which Pages
// should be each tab’s root Page
tab1Root: any = Page1;
tab2Root: any = Page2;
tab3Root: any = CartPage;
Thanks for replay
but my problem is that i am using sidemenu and tabs together and i defime tabsPage as root page and add only 4 pages in tabspage when i open side menu and open any page tabs gone disappear. i want tabs on all sidemenu pages also please look attached images
Did you put the tabs code on the main page ? If you open new page for each side menu option, you should probably add the tabs in all the pages to have it. If you use the inspector on your browser you should probably see the tabs menu behind the page shown.
<div *ngFor="let p of menuLinks; let i=index" >
<a href="#/tabs/{{p.uri}}" class="btn btn-primary" menuClose >{{p.name}}</a>
</div>
though one issue there ,its for cache issue & its for all regardless you use this or not.
just have look at it & let me know if anyone have any fix to that.
I made 2 work around to implement this situation 1 worked and other not
the normal was is to link all menu pages to Tabs and pass index of the tab you want to open
and in Tabs add all pages of menu and what u dont like to show it tabs make tab option show=‘false’.
but this solution work with some and others not … show ='false ’ remove the tab itself
…
the other solution i made worked but haveee some rewriting on code and some issue .
it is to implement new component with icons to look like tabs and this compoenent add it into footer of app.html
it will be statically shown in all pages …
u can add event to page that u want to hide to on it