-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
307 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
<div class="demo-select"> | ||
<md-select placeholder="Food" [formControl]="control" [required]="isRequired"> | ||
<md-option *ngFor="let food of foods" [value]="food.value"> {{ food.viewValue }} </md-option> | ||
</md-select> | ||
<p> Value: {{ control.value }} </p> | ||
<p> Touched: {{ control.touched }} </p> | ||
<p> Dirty: {{ control.dirty }} </p> | ||
<p> Status: {{ control.status }} </p> | ||
<button md-button (click)="control.setValue('pizza-1')">SET VALUE</button> | ||
<button md-button (click)="isRequired=!isRequired">TOGGLE REQUIRED</button> | ||
<md-card> | ||
<md-select placeholder="Food" [formControl]="foodControl"> | ||
<md-option *ngFor="let food of foods" [value]="food.value"> {{ food.viewValue }} </md-option> | ||
</md-select> | ||
<p> Value: {{ foodControl.value }} </p> | ||
<p> Touched: {{ foodControl.touched }} </p> | ||
<p> Dirty: {{ foodControl.dirty }} </p> | ||
<p> Status: {{ foodControl.status }} </p> | ||
<button md-button (click)="foodControl.setValue('pizza-1')">SET VALUE</button> | ||
<button md-button (click)="toggleDisabled()">TOGGLE DISABLED</button> | ||
</md-card> | ||
|
||
<md-card> | ||
<md-select placeholder="Drink" [(ngModel)]="currentDrink" [required]="isRequired" [disabled]="isDisabled" | ||
#drinkControl="ngModel"> | ||
<md-option *ngFor="let drink of drinks" [value]="drink.value" [disabled]="drink.disabled"> | ||
{{ drink.viewValue }} | ||
</md-option> | ||
</md-select> | ||
<p> Value: {{ currentDrink }} </p> | ||
<p> Touched: {{ drinkControl.touched }} </p> | ||
<p> Dirty: {{ drinkControl.dirty }} </p> | ||
<p> Status: {{ drinkControl.control?.status }} </p> | ||
<button md-button (click)="currentDrink='sprite-1'">SET VALUE</button> | ||
<button md-button (click)="isRequired=!isRequired">TOGGLE REQUIRED</button> | ||
<button md-button (click)="isDisabled=!isDisabled">TOGGLE DISABLED</button> | ||
</md-card> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
.demo-select { | ||
display: flex; | ||
flex-flow: row wrap; | ||
|
||
md-card { | ||
width: 450px; | ||
margin: 24px; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
// Gradient for showing the dashed line when the input is disabled. | ||
$md-underline-disabled-background-image: | ||
linear-gradient(to right, rgba(0, 0, 0, 0.26) 0%, rgba(0, 0, 0, 0.26) 33%, transparent 0%); | ||
|
||
@mixin md-control-disabled-underline { | ||
background-image: $md-underline-disabled-background-image; | ||
background-size: 4px 1px; | ||
background-repeat: repeat-x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<ng-content></ng-content> | ||
<div class="md-option-ripple" md-ripple md-ripple-background-color="rgba(0,0,0,0)" | ||
<div class="md-option-ripple" *ngIf="!disabled" md-ripple md-ripple-background-color="rgba(0,0,0,0)" | ||
[md-ripple-trigger]="_getHostElement()"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.