I am trying to get the selected step in an component that is using Angular Material Design stepper.
The thing is that I am trying to get it by using selectedIndex property, but now is always getting "1" when I try to get it
<button mat-button mat-flat-button color="primary"
(click)="onSave(stepper)">
SAVE
</button>
onSave(stepper: MatStepper)
{
debugger;
let workflowStepName = this.declarationWorkflowHelper.getWorkflowName(stepper.selectedIndex);
this.screenSave.next(workflowStepName);
}
I expect the selected index of the stepper, but I am always retrieving "1"