parent
e310bee9e2
commit
3ca6df87b8
|
@ -98,7 +98,7 @@ export class NgSelectOption implements OnDestroy {
|
||||||
if (isPresent(this._select)) this.id = this._select._registerOption();
|
if (isPresent(this._select)) this.id = this._select._registerOption();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Input('ng-value')
|
@Input('ngValue')
|
||||||
set ngValue(value: any) {
|
set ngValue(value: any) {
|
||||||
if (this._select == null) return;
|
if (this._select == null) return;
|
||||||
this._select._optionMap.set(this.id, value);
|
this._select._optionMap.set(this.id, value);
|
||||||
|
|
|
@ -438,7 +438,7 @@ export function main() {
|
||||||
(tcb: TestComponentBuilder, async) => {
|
(tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div>
|
var t = `<div>
|
||||||
<select [(ngModel)]="selectedCity">
|
<select [(ngModel)]="selectedCity">
|
||||||
<option *ngFor="#c of list" [ng-value]="c">{{c['name']}}</option>
|
<option *ngFor="#c of list" [ngValue]="c">{{c['name']}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ export function main() {
|
||||||
(tcb: TestComponentBuilder, async) => {
|
(tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div>
|
var t = `<div>
|
||||||
<select [(ngModel)]="selectedCity">
|
<select [(ngModel)]="selectedCity">
|
||||||
<option *ngFor="#c of list" [ng-value]="c">{{c['name']}}</option>
|
<option *ngFor="#c of list" [ngValue]="c">{{c['name']}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ export function main() {
|
||||||
(tcb: TestComponentBuilder, async) => {
|
(tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div>
|
var t = `<div>
|
||||||
<select [(ngModel)]="selectedCity">
|
<select [(ngModel)]="selectedCity">
|
||||||
<option *ngFor="#c of list" [ng-value]="c">{{c}}</option>
|
<option *ngFor="#c of list" [ngValue]="c">{{c}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
||||||
|
@ -524,7 +524,7 @@ export function main() {
|
||||||
(tcb: TestComponentBuilder, async) => {
|
(tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div>
|
var t = `<div>
|
||||||
<select [(ngModel)]="selectedCity">
|
<select [(ngModel)]="selectedCity">
|
||||||
<option *ngFor="#c of list; trackBy:customTrackBy" [ng-value]="c">{{c}}</option>
|
<option *ngFor="#c of list; trackBy:customTrackBy" [ngValue]="c">{{c}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ export function main() {
|
||||||
(tcb: TestComponentBuilder, async) => {
|
(tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div>
|
var t = `<div>
|
||||||
<select [(ngModel)]="selectedCity">
|
<select [(ngModel)]="selectedCity">
|
||||||
<option *ngFor="#c of list" [ng-value]="c">{{c}}</option>
|
<option *ngFor="#c of list" [ngValue]="c">{{c}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
@ -583,7 +583,7 @@ export function main() {
|
||||||
(tcb: TestComponentBuilder, async) => {
|
(tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div>
|
var t = `<div>
|
||||||
<select [(ngModel)]="selectedCity">
|
<select [(ngModel)]="selectedCity">
|
||||||
<option *ngFor="#c of list" [ng-value]="c">{{c['name']}}</option>
|
<option *ngFor="#c of list" [ngValue]="c">{{c['name']}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue