Components: Angular Material stepper: method for go to any step index programatically ?

Created on 14 Mar 2018  路  3Comments  路  Source: angular/components

Bug, feature request, or proposal:

I want to jump at any step if non-linear stepper is being used. For example i have 3 steps and want to jump to direct step no 3 from step 1 using index by programming.

What is the expected behavior?

@ViewChild('stepper') stepper: MatStepper;
public proceed(index) {
//cannot find any method i.e. this.stepper.goToStep(index);
}

What is the current behavior?

@ViewChild('stepper') stepper: MatStepper;
public proceed() {
this.stepper.next();
}

Most helpful comment

Here a stackblitz https://stackblitz.com/edit/angular-demo-matstepper-move

credit to : https://stackoverflow.com/a/48417905/9456169

ps : with the same title as your issue i found it in less than two minutes...

All 3 comments

You can set selectedIndex = 2 directly.

Here a stackblitz https://stackblitz.com/edit/angular-demo-matstepper-move

credit to : https://stackoverflow.com/a/48417905/9456169

ps : with the same title as your issue i found it in less than two minutes...

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Miiekeee picture Miiekeee  路  3Comments

dzrust picture dzrust  路  3Comments

Hiblton picture Hiblton  路  3Comments

kara picture kara  路  3Comments

LoganDupont picture LoganDupont  路  3Comments