angulardart / angular_components

The official Material Design components for AngularDart. Used at Google in production apps.

Home Page:https://pub.dev/packages/angular_components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request for Material-Stepper make activeStepIndex an Input

reducedcarpet opened this issue · comments

This is more of a feature request than a bug, but the pud.dev page directed me to make an issue rather than a pull request. Also this might be in line with whatever coding principles you guys are about.

I would like to change the activeStep of a material stepper through an input rather than haveing to go around in code with:

@ViewChild(MaterialStepperComponent)
  MaterialStepperComponent stepper;

and then:
stepper.activeStepIndex = myActiveStepWhatISavedFromLastTime;

I thought something like:

    <material-stepper legalJumps="backwards"
                      orientation="vertical"
                      [activeStepIndex]="myActiveStepWhatISavedFromLastTime"
                      size="default">

Would be 'nicer' and save me having to mess around with lifecycle hooks.