Skip to content

Commit c1af22d

Browse files
committed
fix rebase issues
1 parent d02495f commit c1af22d

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/demo-app/select/select-demo.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
<p>
3434
<label for="drinks-theme">Theme:</label>
3535
<select [(ngModel)]="drinksTheme" id="drinks-theme">
36-
<option *ngFor="let theme of availableThemes" [value]="theme.value">{{ theme.name }}</option>
36+
<option *ngFor="let theme of availableThemes" [value]="theme.value">
37+
{{theme.name}}
38+
</option>
3739
</select>
3840
</p>
3941

@@ -111,15 +113,17 @@
111113
<md-card>
112114
<md-card-subtitle>compareWith</md-card-subtitle>
113115
<md-card-content>
114-
<md-select placeholder="Drink" [color]="drinksTheme"
115-
[(ngModel)]="currentDrinkObject"
116-
[required]="drinkObjectRequired"
117-
[compareWith]="compareByValue ? compareDrinkObjectsByValue : compareByReference"
118-
#drinkObjectControl="ngModel">
119-
<md-option *ngFor="let drink of drinks" [value]="drink" [disabled]="drink.disabled">
120-
{{ drink.viewValue }}
121-
</md-option>
122-
</md-select>
116+
<md-form-field [color]="drinksTheme">
117+
<md-select placeholder="Drink"
118+
[(ngModel)]="currentDrinkObject"
119+
[required]="drinkObjectRequired"
120+
[compareWith]="compareByValue ? compareDrinkObjectsByValue : compareByReference"
121+
#drinkObjectControl="ngModel">
122+
<md-option *ngFor="let drink of drinks" [value]="drink" [disabled]="drink.disabled">
123+
{{ drink.viewValue }}
124+
</md-option>
125+
</md-select>
126+
</md-form-field>
123127
<p> Value: {{ currentDrinkObject | json }} </p>
124128
<p> Touched: {{ drinkObjectControl.touched }} </p>
125129
<p> Dirty: {{ drinkObjectControl.dirty }} </p>

src/lib/select/select.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ export class MdSelect extends _MdSelectMixinBase implements AfterContentInit, On
679679
// Defer setting the value in order to avoid the "Expression
680680
// has changed after it was checked" errors from Angular.
681681
Promise.resolve().then(() => {
682-
this._setSelectionByValue(this._control ? this._control.value : this._value);
682+
this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value);
683683
});
684684
}
685685

0 commit comments

Comments
 (0)