/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/stepper/stepper-responsive/stepper-responsive-example.html
56 строк
2 KB
Kristiyan Kostadinov
refactor(multiple): switch button selectors
14 мар 2025, 09:04
14 мар 2025, 09:04
103ac7c
Код
Авторство
О чём код?
@switch (stepperOrientation | async) { @case ('horizontal') { <div>Make your screen smaller to see a vertical stepper</div> } @case ('vertical') { <div>Make your screen larger to see a horizontal stepper</div> } } <mat-stepper class="example-stepper" [orientation]="(stepperOrientation | async)!"> <mat-step [stepControl]="firstFormGroup" label="Fill out your name"> <form [formGroup]="firstFormGroup"> <mat-form-field> <mat-label>Name</mat-label> <input matInput placeholder="Last name, First name" formControlName="firstCtrl" required> </mat-form-field> <div> <button matButton matStepperNext>Next</button> </div> </form> </mat-step> <mat-step [stepControl]="secondFormGroup" label="Fill out your address"> <form [formGroup]="secondFormGroup"> <mat-form-field> <mat-label>Address</mat-label> <input matInput formControlName="secondCtrl" placeholder="Ex. 1 Main St, New York, NY" required> </mat-form-field> <div> <button matButton matStepperPrevious>Back</button> <button matButton matStepperNext>Next</button> </div> </form> </mat-step> <mat-step [stepControl]="thirdFormGroup" label="Fill out your phone number"> <form [formGroup]="thirdFormGroup"> <mat-form-field> <mat-label>Phone number</mat-label> <input matInput formControlName="thirdCtrl" placeholder="Ex. 12345678" required> </mat-form-field> <div> <button matButton matStepperPrevious>Back</button> <button matButton matStepperNext>Next</button> </div> </form> </mat-step> <mat-step> <ng-template matStepLabel>Done</ng-template> <p>You are now done.</p> <div> <button matButton matStepperPrevious>Back</button> </div> </mat-step> </mat-stepper>