angular material stepper: disable header navigation

后端 未结 11 974
再見小時候
再見小時候 2021-02-03 18:16

I want to navigate the stepper only through the next and back buttons.

I can\'t get this to work since users can also click each step label to navigate to any step. I c

11条回答
  •  太阳男子
    2021-02-03 19:15

    First you need add ViewEncapsulation.None in your component config

    @Component({
     selector: 'app-example',
     encapsulation: `ViewEncapsulation.None`
     })
    

    Then add this in your component CSS.

    .mat-horizontal-stepper-header-container  {
      display: none !important;
     }
    

提交回复
热议问题