feat(segment): adding a test case for a segment under a nabber

references #614
This commit is contained in:
Brandy Carney
2015-12-01 12:28:00 -05:00
parent d9bfb49d8b
commit df5107b90e
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
import {App, Page} from 'ionic/ionic';
@Page({
templateUrl: 'main.html',
providers: [FormBuilder],
directives: [FORM_DIRECTIVES]
})
class SegmentPage {
constructor(fb: FormBuilder) {
this.relationship = 'enemies';
}
}
@App({
pages: [SegmentPage],
template: `<ion-nav [root]="root"></ion-nav>`
})
class MyApp {
constructor() {
this.root = SegmentPage;
}
}

View File

@@ -0,0 +1,22 @@
<ion-navbar *navbar>
<ion-title>
Segment under Navbar
</ion-title>
</ion-navbar>
<ion-toolbar>
<ion-segment [(ng-model)]="relationship">
<ion-segment-button value="friends" class="e2eSegmentFriends">
Friends
</ion-segment-button>
<ion-segment-button value="enemies">
Enemies
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-content padding>
<p>Are we friends or enemies? <b>{{ relationship }}</b></p>
</ion-content>