angulardart / angular_components

The official Material Design components for AngularDart. Used at Google in production apps.
https://pub.dev/packages/angular_components
374 stars 123 forks source link

Feature Request for Material-Stepper make activeStepIndex an Input #462

Open reducedcarpet opened 4 years ago

reducedcarpet commented 4 years ago

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.