小编Vis*_*war的帖子

如何在步进器组件的各个步骤之间共享数据?

有没有办法可以在步进器组件的各个步骤之间共享数据?

例如,在下面的代码中,我希望以 的形式填写的数据app-step1在组件中可用app-step2

<mat-horizontal-stepper [linear]="true" #stepper="matHorizontalStepper" >
  <mat-step [stepControl]="zerpFormGroup" >
        <ng-template matStepLabel>Step I</ng-template>
        <app-step1 [stepper]="stepper"></app-step1>            
  </mat-step>
  <mat-step [stepControl]="firstFormGroup" >
      <ng-template matStepLabel ">Step II</ng-template><br>      
      <app-step2 [stepper]="stepper"></app-step2>                         
  </mat-step>      
Run Code Online (Sandbox Code Playgroud)

angular-material angular stepper

3
推荐指数
1
解决办法
6672
查看次数

标签 统计

angular ×1

angular-material ×1

stepper ×1