NativeScript - ListPicker

list pick 就是下拉框

import {Component, ViewChild, ElementRef} from "angular2/core";
import {Color} from "color";
import {SearchBar} from "ui/search-bar";
import {TextField} from "ui/text-field";
import {Switch} from "ui/switch";
import {Slider} from "ui/slider";
import {Progress}from"ui/progress";
import {PropertyChangeData} from "data/observable";
import {Observable} from 'data/observable';

@Component({
selector: "my-app",
template: `
<StackLayout>
<ListPicker #lp [items]='model.listPickerItems' [(ngModel)]='model.selectedIndex'></ListPicker>
<Label text={{lp.items}}></Label> <Label text={{lp.selectedIndex}}></Label>
</StackLayout>
`,
styleUrls: ["app.css"]
})
export class AppComponent {
public model: Observable;
constructor() {
this.model = new Observable({
'test': 'Jack',
'testBoolean': false,
'deliveryDate': new Date(),
'deliveryTime': new Date(),
'mydate': new Date(),
'sliderTest': 0,
'search': null,
'selectedIndex': 3,
'listPickerItems': [
1, 2, 3, 4, 5
]
});
}

ngAfterViewInit() {

}
}