Content 1

Angular 4 How to disable tab navigation in Angular material tab group?

<md-tab-group>
  <md-tab label="Tab 1">Content 1</md-tab>
  <md-tab label="Tab 2">Content 2</md-tab>
</md-tab-group>

      

I have a group of tabs, but I don't want the user to be able to navigate to the next form without first filling out the required controls. Instead, I would like the user to be able to only navigate with the next and back buttons, which I enable by checking out based on validation.

+3


source to share


1 answer


I would do it using the following css

::ng-deep .mat-tab-label {
   pointer-events: none;
}

      



Plunger example

+4


source







All Articles