ABE
ABE

Reputation: 706

Material - pass directive to child component

I use the Stapler material, and I need to pass a custom directive to the component, to access the properties of the element by app directive. I tried to write:

  <mat-vertical-stepper labelPosition="bottom">
    <mat-step *ngFor="let step of steps" [label]="step" customDirective></mat-step>
  </mat-vertical-stepper>

But the resulat HTML is:

<div class="mat-step-text-label ng-star-inserted">Step</div>

Without my directive.

How can I do it?

Exemple stackblitz

Upvotes: 0

Views: 711

Answers (1)

Ashot Aleqsanyan
Ashot Aleqsanyan

Reputation: 4453

Is this what you want? Please have a look at the example.

https://stackblitz.com/edit/angular-g9huhk-4xwcmx?file=src/app/custom.directive.ts

Upvotes: 1

Related Questions