P
P
Pavel Talaiko2019-07-16 13:51:29
Angular
Pavel Talaiko, 2019-07-16 13:51:29

How to mount components via HTML tags in ANGUlAR 5-8?

Hello.
So, I have a task to create this:
Here is the expansion-panel ANGULAR:

<mat-expansion-panel>
    <mat-expansion-panel-header>
      //content
    </mat-expansion-panel-header>
</mat-expansion-panel>

It needs to be completely custom.
Only here is the question they created the mat-expansion-panel component.
We described the location of the content in it, and I just pass this content. They just know where to put it. How can I do that? How to access the content that lies inside the tags of my component.
<my-component>
  <app-another-component [data] = "data"></app-another-component> 
<-- Вот как получить ссылку на этот компонент для его расположения в компоненте "my-component" -->
</my-component>

I will be very grateful for the answer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2019-07-16
@jsdevel

short https://www.bxnotes.ru/conspect/lib/angular/angula...
ok https://medium.com/claritydesignsystem/ng-content-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question