forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(material/slide-toggle): allow for icon to be hidden (angular#27330)
Adds an input that allows users to opt into hiding the slide toggle icon. Fixes angular#27321.
- Loading branch information
Showing
6 changed files
with
37 additions
and
23 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,29 +1,15 @@ | ||
<div class="demo-slide-toggle"> | ||
|
||
<mat-slide-toggle color="primary" [(ngModel)]="firstToggle"> | ||
Default Slide Toggle | ||
</mat-slide-toggle> | ||
|
||
<mat-slide-toggle [(ngModel)]="firstToggle" disabled> | ||
Disabled Slide Toggle | ||
</mat-slide-toggle> | ||
|
||
<mat-slide-toggle [disabled]="firstToggle"> | ||
Disable Bound | ||
</mat-slide-toggle> | ||
<mat-slide-toggle color="primary" [(ngModel)]="firstToggle">Default Slide Toggle</mat-slide-toggle> | ||
<mat-slide-toggle [(ngModel)]="firstToggle" disabled>Disabled Slide Toggle</mat-slide-toggle> | ||
<mat-slide-toggle [disabled]="firstToggle">Disable Bound</mat-slide-toggle> | ||
<mat-slide-toggle hideIcon [(ngModel)]="firstToggle">No icon</mat-slide-toggle> | ||
|
||
<p>Example where the slide toggle is required inside of a form.</p> | ||
|
||
<form #form="ngForm" (ngSubmit)="onFormSubmit()"> | ||
|
||
<mat-slide-toggle name="slideToggle" [(ngModel)]="formToggle"> | ||
Slide Toggle | ||
</mat-slide-toggle> | ||
|
||
<mat-slide-toggle name="slideToggle" [(ngModel)]="formToggle">Slide Toggle</mat-slide-toggle> | ||
<p> | ||
<button mat-raised-button type="submit">Submit Form</button> | ||
</p> | ||
|
||
</form> | ||
|
||
</div> | ||
</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
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