Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
import { Tab1 } from './tab1-page';
import { Tab2 } from './tab2-page';
@Component({
template: `
<ion-tabs>
<ion-tab tabIcon="heart" [root]="tab1"></ion-tab>
<ion-tab tabIcon="star" [root]="tab2"></ion-tab>
</ion-tabs>`
})
class MyApp {
tab1: any;
tab2: any;
constructor() {
this.tab1 = Tab1;
this.tab2 = Tab2;
}
}
import { Component } from '@angular/core';
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Heart</ion-title>
</ion-navbar>
</ion-header>
<ion-content>Tab 1</ion-content>`
})
export class Tab1 {}
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Star</ion-title>
</ion-navbar>
</ion-header>
<ion-content>Tab 2</ion-content>`
})
export class Tab2 {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment