Dynamic loading of components based on their reference

Asked

Viewed 31 times

1

Everybody, good afternoon, everybody.

I’m having the following problem.

Given a structure:

[
   {
     title: "A",
     content: ComponentReference
   },
   {
     title: "B",
     content: ComponentReference
   },
]

I need to load one from Angular Material, so that each Componentreference, which are references of different components, need to be rendered inside each mat-tab.

Any idea how I could make this Componentreference be rendered inside the mat-tab?

1 answer

0

Solved using Ngcomponentoutlet.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.