title: Can I programmatically move the steps of a mat-horizontal-stepper in Angular / Angular Material
body: <p>I have a question regards Angular Material (with Angular 4+). Say in my component template I add a <code>&lt;mat-horizontal-stepper&gt;</code> component, and within each step <code>&lt;mat-step&gt;</code> I have stepper buttons to navigate the component. Like so...</p>
  
  <pre><code>&lt;mat-horizontal-stepper&gt;
    &lt;mat-step&gt;
      Step 1
      &lt;button mat-button matStepperPrevious type="button"&gt;Back&lt;/button&gt;
      &lt;button mat-button matStepperNext type="button"&gt;Next&lt;/button&gt;
    &lt;/mat-step&gt;
    &lt;mat-step&gt;
      Step 2
      &lt;button mat-button matStepperPrevious type="button"&gt;Back&lt;/button&gt;
      &lt;button mat-button matStepperNext type="button"&gt;Next&lt;/button&gt;
    &lt;/mat-step&gt;
    &lt;mat-step&gt;
      Step 3
      &lt;button mat-button matStepperPrevious type="button"&gt;Back&lt;/button&gt;
      &lt;button mat-button matStepperNext type="button"&gt;Next&lt;/button&gt;
    &lt;/mat-step&gt;
  &lt;/mat-horizontal-stepper&gt;
  </code></pre>
  
  <p>Now I am wondering if it is possible to remove the buttons out of each step and have them elsewhere in the <code>&lt;mat-horizontal-stepper&gt;</code> in a static position or even outside the <code>&lt;mat-horizontal-stepper&gt;</code> and I can navigate backwards and forwards using code within my component typescript file. To give an idea, I would like my HTML be something like this</p>
  
  <pre><code>&lt;mat-horizontal-stepper&gt;
      &lt;mat-step&gt;
          Step 1
      &lt;/mat-step&gt;
      &lt;mat-step&gt;
          Step 2
      &lt;/mat-step&gt;
      &lt;mat-step&gt;
          Step 3
      &lt;/mat-step&gt;
      &lt;!-- one option --&gt;
      &lt;div&gt;
         &lt;button mat-button matStepperPrevious type="button"&gt;Back&lt;/button&gt;
         &lt;button mat-button matStepperNext type="button"&gt;Next&lt;/button&gt;
      &lt;/div&gt;
  &lt;/mat-horizontal-stepper&gt;
  
  &lt;!-- second option --&gt;
  &lt;div&gt;
     &lt;button (click)="goBack()" type="button"&gt;Back&lt;/button&gt;
     &lt;button (click)="goForward()" type="button"&gt;Next&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>