Skip to content

Instantly share code, notes, and snippets.

@AmmarCodes
Created January 17, 2017 19:23
Show Gist options
  • Save AmmarCodes/6c8ffdb655ec1a78a4d702c3f63612f6 to your computer and use it in GitHub Desktop.
Save AmmarCodes/6c8ffdb655ec1a78a4d702c3f63612f6 to your computer and use it in GitHub Desktop.
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