S
S
Speakermen2021-10-25 03:46:45
Angular
Speakermen, 2021-10-25 03:46:45

How to not create a parent element in angular?

How not to create

<app-post _ngcontent-jxd-c17="" _nghost-jxd-c16="">
? the pattern is crumbling

<app-posts _ngcontent-jxd-c18="" _nghost-jxd-c17="">
    <div _ngcontent-jxd-c17="" class="container">
        <div _ngcontent-jxd-c17="" class="row">
            <app-post _ngcontent-jxd-c17="" _nghost-jxd-c16="">
                <div _ngcontent-jxd-c16="" class="col-6">
                    <div _ngcontent-jxd-c16="" class="padd_0-15 bg">1 1</div>
                </div>
            </app-post>
            <app-post _ngcontent-jxd-c17="" _nghost-jxd-c16="">
                <div _ngcontent-jxd-c16="" class="col-6">
                    <div _ngcontent-jxd-c16="" class="padd_0-15 bg">1 1</div>
                </div>
            </app-post>
        </div>
    </div>
</app-posts>


//app-post
<div class="col-6">
  <div class="padd_0-15 bg">1 1</div>
</div>

//app-posts
<div class="container">
  <div class="row">
    <app-post></app-post>
    <app-post></app-post>
  </div>
</div>

//app-root
<app-posts></app-posts>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question