在 Angular 中,是否可以有一个线性步进器,其中各个步骤是单独的组件?例如:
<mat-horizontal-stepper [linear]="isLinear">
<mat-step [stepControl]="firstFormGroup" label="Some Form">
<first-component></first-component>
</mat-step>
<mat-step [stepControl]="secondFormGroup" label="Another Form">
<second-component></second-component>
</mat-step>
<mat-step [stepControl]="thirdFormGroup" label="Review">
<third-component></third-component>
</mat-step>
</mat-horizontal-stepper>
Run Code Online (Sandbox Code Playgroud)
当我尝试这个时,我在点击matStepperNext按钮时收到以下错误:
TypeError: Cannot read property 'invalid' of undefined.
angular-material angular-material2 angular angular-material-stepper