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
For anyone that's still looking for an alternate solution if ::ng-deep does not work.
Furthermore, ::ng-deep is deprecated and setting ViewEncapsulation to none is the preferred way to go if you want to do it using CSS.
Import ViewEncapsulation and set to None in your
compnent.ts:
import { Component, OnInit, ViewEncapsulation } from "@angular/core";
@Component({
selector: "stepper-overview-example",
templateUrl: "stepper-overview-example.html",
styleUrls: ["stepper-overview-example.css"],
encapsulation: ViewEncapsulation.None
})
export class StepperOverviewExample implements OnInit {
isLinear = false;
constructor() {}
ngOnInit() {}
}
set pointer-events to none in your
component.css:
.mat-horizontal-stepper-header {
pointer-events: none !important;
}
Here's a DEMO.