test(select): ngFor ion-option w/ array of numbers

Related: #5495
This commit is contained in:
Adam Bradley
2016-02-18 10:25:13 -06:00
parent 098371a709
commit 7e3eb23345
2 changed files with 8 additions and 12 deletions

View File

@@ -1,8 +1,11 @@
import {NgFor} from 'angular2/common';
import {App, Page} from '../../../../../ionic/ionic';
@Page({
templateUrl: 'main.html'
templateUrl: 'main.html',
directives: [NgFor]
})
class E2EPage {
musicAlertOpts;
@@ -12,6 +15,7 @@ class E2EPage {
music: string;
month: string;
year: string;
years: Array<number>;
constructor() {
this.gaming = '';
@@ -20,6 +24,8 @@ class E2EPage {
this.month = '12';
this.year = '1994';
this.years = [1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999];
this.musicAlertOpts = {
title: '1994 Music',
subTitle: 'Select your favorite'

View File

@@ -67,17 +67,7 @@
<ion-option value="12">December</ion-option>
</ion-select>
<ion-select [(ngModel)]="year">
<ion-option>1989</ion-option>
<ion-option>1990</ion-option>
<ion-option>1991</ion-option>
<ion-option>1992</ion-option>
<ion-option>1993</ion-option>
<ion-option>1994</ion-option>
<ion-option>1995</ion-option>
<ion-option>1996</ion-option>
<ion-option>1997</ion-option>
<ion-option>1998</ion-option>
<ion-option>1999</ion-option>
<ion-option *ngFor="#yr of years">{{yr}}</ion-option>
</ion-select>
</ion-item>