javascript - What is the function of the stepControl property on mat-step directives? - Stack Overflow

On the Angular Material stepper there is a stepControl property on each mat-step that contains a form.

On the Angular Material stepper there is a stepControl property on each mat-step that contains a form. What does the stepControl property do?

<mat-step [stepControl]="registrationForm">

It seems like the function would be to disallow moving to the next step if the form is not valid, but just wanted to double check.

On the Angular Material stepper there is a stepControl property on each mat-step that contains a form. What does the stepControl property do?

<mat-step [stepControl]="registrationForm">

It seems like the function would be to disallow moving to the next step if the form is not valid, but just wanted to double check.

Share Improve this question asked Feb 10, 2022 at 14:18 OleOle 47.6k70 gold badges238 silver badges447 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Correct, however, if any form validation is not pulsory you can use the isOptional property to ignore that form's validity and proceed to the next step.

<mat-step [stepControl]="registrationForm" [optional]="isOptional">

Similarly if you are not using Reactive Forms you can use another property called pleted to allow the user to proceed to the next step only if pleted is true

<mat-step [pleted]="isCompleted">

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745629835a4637038.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信