mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(input): add select to the form input test
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import {App} from '../../../../../src';
|
||||
import {App, Page} from '../../../../../src';
|
||||
import {FormBuilder, Validators, Control} from '@angular/common';
|
||||
|
||||
|
||||
@App({
|
||||
@Page({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
class E2EPage {
|
||||
loginForm: any;
|
||||
|
||||
login = {
|
||||
@@ -29,7 +29,8 @@ class E2EApp {
|
||||
])],
|
||||
username: [""],
|
||||
password: ["", Validators.required],
|
||||
comments: ["", Validators.required]
|
||||
comments: ["", Validators.required],
|
||||
gender: ["", Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -51,3 +52,10 @@ class E2EApp {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@App({
|
||||
template: '<ion-nav [root]="rootPage"></ion-nav>'
|
||||
})
|
||||
class E2EApp {
|
||||
rootPage = E2EPage;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@
|
||||
<ion-textarea clearInput [(ngModel)]="login.comments" ngControl="comments" required>Comment value</ion-textarea>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Gender</ion-label>
|
||||
<ion-select [(ngModel)]="login.gender" ngControl="gender">
|
||||
<ion-option value="f">Female</ion-option>
|
||||
<ion-option value="m">Male</ion-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<div padding-left padding-right>
|
||||
<button block (click)="submit($event, login)">Login</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user