Skip to content

Commit

Permalink
fix(select): update name from ng-value to ngValue
Browse files Browse the repository at this point in the history
Closes #7939
  • Loading branch information
kara committed Apr 6, 2016
1 parent e310bee commit 3ca6df8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class NgSelectOption implements OnDestroy {
if (isPresent(this._select)) this.id = this._select._registerOption();
}

@Input('ng-value')
@Input('ngValue')
set ngValue(value: any) {
if (this._select == null) return;
this._select._optionMap.set(this.id, value);
Expand Down
12 changes: 6 additions & 6 deletions modules/angular2/test/common/forms/integration_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export function main() {
(tcb: TestComponentBuilder, async) => {
var t = `<div>
<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>
</div>`;

Expand Down Expand Up @@ -470,7 +470,7 @@ export function main() {
(tcb: TestComponentBuilder, async) => {
var t = `<div>
<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>
</div>`;

Expand Down Expand Up @@ -498,7 +498,7 @@ export function main() {
(tcb: TestComponentBuilder, async) => {
var t = `<div>
<select [(ngModel)]="selectedCity">
<option *ngFor="#c of list" [ng-value]="c">{{c}}</option>
<option *ngFor="#c of list" [ngValue]="c">{{c}}</option>
</select>
</div>`;
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
Expand All @@ -524,7 +524,7 @@ export function main() {
(tcb: TestComponentBuilder, async) => {
var t = `<div>
<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>
</div>`;

Expand Down Expand Up @@ -554,7 +554,7 @@ export function main() {
(tcb: TestComponentBuilder, async) => {
var t = `<div>
<select [(ngModel)]="selectedCity">
<option *ngFor="#c of list" [ng-value]="c">{{c}}</option>
<option *ngFor="#c of list" [ngValue]="c">{{c}}</option>
</select>
</div>`;

Expand Down Expand Up @@ -583,7 +583,7 @@ export function main() {
(tcb: TestComponentBuilder, async) => {
var t = `<div>
<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>
</div>`;

Expand Down

0 comments on commit 3ca6df8

Please sign in to comment.