0

I'm trying to include some template in child from parent, but I need to access child properties inside tranclusions. Is there any way to do so ?

Child Component:-

<ul>
  <li *ngFor="let item of companies">
    {{item.name}} <ng-content></ng-content>
  </li>
</ul>

Parent Component:-

<app-child [companies]="companies">
  <a href="">
    Visit {{item}}
  </a>
</app-child>

I need "item" inside my parent component here.

Stackblitz https://stackblitz.com/edit/angular-fj94ej

Devansh
  • 183
  • 1
  • 9

0 Answers0