File tree Expand file tree Collapse file tree 11 files changed +29
-13
lines changed
select-error-state-matcher Expand file tree Collapse file tree 11 files changed +29
-13
lines changed Original file line number Diff line number Diff line change 44
55< h4 > mat-select</ h4 >
66< mat-form-field >
7- < mat-select placeholder ="Choose an option " [disabled] ="disableSelect.value ">
7+ < mat-label > Choose an option</ mat-label >
8+ < mat-select [disabled] ="disableSelect.value ">
89 < mat-option value ="option1 "> Option 1</ mat-option >
910 < mat-option value ="option2 " disabled > Option 2 (disabled)</ mat-option >
1011 < mat-option value ="option3 "> Option 3</ mat-option >
@@ -13,7 +14,8 @@ <h4>mat-select</h4>
1314
1415< h4 > native html select</ h4 >
1516< mat-form-field >
16- < select matNativeControl placeholder ="Choose an option " [disabled] ="disableSelect.value ">
17+ < mat-label > Choose an option</ mat-label >
18+ < select matNativeControl [disabled] ="disableSelect.value ">
1719 < option value ="" selected > </ option >
1820 < option value ="volvo "> Volvo</ option >
1921 < option value ="saab " disabled > Saab</ option >
Original file line number Diff line number Diff line change 11< h4 > mat-select</ h4 >
22< mat-form-field >
3- < mat-select placeholder ="Choose one " [formControl] ="selected " [errorStateMatcher] ="matcher ">
3+ < mat-label > Choose one</ mat-label >
4+ < mat-select [formControl] ="selected " [errorStateMatcher] ="matcher ">
45 < mat-option > Clear</ mat-option >
56 < mat-option value ="valid "> Valid option</ mat-option >
67 < mat-option value ="invalid "> Invalid option</ mat-option >
@@ -14,7 +15,8 @@ <h4>mat-select</h4>
1415
1516< h4 > native html select</ h4 >
1617< mat-form-field class ="demo-full-width ">
17- < select matNativeControl placeholder ="Choose one " [formControl] ="nativeSelectFormControl " [errorStateMatcher] ="matcher ">
18+ < mat-label > Choose one</ mat-label >
19+ < select matNativeControl [formControl] ="nativeSelectFormControl " [errorStateMatcher] ="matcher ">
1820 < option value =""> </ option >
1921 < option value ="valid " selected > Valid option</ option >
2022 < option value ="invalid "> Invalid option</ option >
Original file line number Diff line number Diff line change 11< form >
22 < h4 > mat-select</ h4 >
33 < mat-form-field >
4- < mat-select placeholder ="Favorite food " [(ngModel)] ="selectedValue " name ="food ">
4+ < mat-label > Favorite food</ mat-label >
5+ < mat-select [(ngModel)] ="selectedValue " name ="food ">
56 < mat-option *ngFor ="let food of foods " [value] ="food.value ">
67 {{food.viewValue}}
78 </ mat-option >
@@ -10,7 +11,8 @@ <h4>mat-select</h4>
1011 < p > Selected food: {{selectedValue}} </ p >
1112 < h4 > native html select</ h4 >
1213 < mat-form-field >
13- < select matNativeControl placeholder ="Favorite car " [(ngModel)] ="selectedCar " name ="car ">
14+ < mat-label > Favorite car</ mat-label >
15+ < select matNativeControl [(ngModel)] ="selectedCar " name ="car ">
1416 < option value ="" selected > </ option >
1517 < option *ngFor ="let car of cars " [value] ="car.value ">
1618 {{car.viewValue}}
Original file line number Diff line number Diff line change 11< h4 > mat select</ h4 >
22< mat-form-field >
3- < mat-select placeholder ="Favorite animal " [formControl] ="animalControl " required >
3+ < mat-label > Favorite animal</ mat-label >
4+ < mat-select [formControl] ="animalControl " required >
45 < mat-option > --</ mat-option >
56 < mat-option *ngFor ="let animal of animals " [value] ="animal ">
67 {{animal.name}}
Original file line number Diff line number Diff line change 11< mat-form-field >
2- < mat-select placeholder ="Toppings " [formControl] ="toppings " multiple >
2+ < mat-label > Toppings</ mat-label >
3+ < mat-select [formControl] ="toppings " multiple >
34 < mat-option *ngFor ="let topping of toppingList " [value] ="topping "> {{topping}}</ mat-option >
45 </ mat-select >
56</ mat-form-field >
Original file line number Diff line number Diff line change 11< mat-form-field >
2- < mat-select placeholder ="Select an option " disableRipple >
2+ < mat-label > Select an option</ mat-label >
3+ < mat-select disableRipple >
34 < mat-option value ="1 "> Option 1</ mat-option >
45 < mat-option value ="2 "> Option 2</ mat-option >
56 < mat-option value ="3 "> Option 3</ mat-option >
Original file line number Diff line number Diff line change 11< h4 > mat-select</ h4 >
22< mat-form-field >
3- < mat-select placeholder ="Pokemon " [formControl] ="pokemonControl ">
3+ < mat-label > Pokemon</ mat-label >
4+ < mat-select [formControl] ="pokemonControl ">
45 < mat-option > -- None --</ mat-option >
56 < mat-optgroup *ngFor ="let group of pokemonGroups " [label] ="group.name "
67 [disabled] ="group.disabled ">
@@ -13,6 +14,7 @@ <h4>mat-select</h4>
1314
1415< h4 > native html select</ h4 >
1516< mat-form-field >
17+ < mat-label > Cars</ mat-label >
1618 < select matNativeControl >
1719 < optgroup label ="Swedish Cars ">
1820 < option value ="volvo "> volvo</ option >
Original file line number Diff line number Diff line change 11< h4 > Basic mat-select</ h4 >
22< mat-form-field >
3- < mat-select placeholder ="Favorite food ">
3+ < mat-label > Favorite food</ mat-label >
4+ < mat-select >
45 < mat-option *ngFor ="let food of foods " [value] ="food.value ">
56 {{food.viewValue}}
67 </ mat-option >
@@ -9,6 +10,7 @@ <h4>Basic mat-select</h4>
910
1011< h4 > Basic native select</ h4 >
1112< mat-form-field >
13+ < mat-label > Cars</ mat-label >
1214 < select matNativeControl required >
1315 < option value ="volvo "> Volvo</ option >
1416 < option value ="saab "> Saab</ option >
Original file line number Diff line number Diff line change 11< mat-form-field >
2- < mat-select placeholder ="Panel color " [formControl] ="panelColor "
2+ < mat-label > Panel color</ mat-label >
3+ < mat-select [formControl] ="panelColor "
34 panelClass ="example-panel-{{panelColor.value}} ">
45 < mat-option value ="red "> Red</ mat-option >
56 < mat-option value ="green "> Green</ mat-option >
Original file line number Diff line number Diff line change 11< h4 > mat-select</ h4 >
22< mat-form-field >
3- < mat-select placeholder ="State ">
3+ < mat-label > State</ mat-label >
4+ < mat-select >
45 < mat-option > None</ mat-option >
56 < mat-option *ngFor ="let state of states " [value] ="state "> {{state}}</ mat-option >
67 </ mat-select >
You can’t perform that action at this time.
0 commit comments