Angular Components Structure in Divs

Discussão em 'Angular' iniciado por thegreyluk, Novembro 21, 2024.

  1. thegreyluk

    thegreyluk Guest

    I am questioning myself of whether or not to structure my Angular components in sub divs, to make the html better.

    I do have a main page and a overview component. Is it good practices in Angular to move this component inside a div tag in the HTML file of the main page?

    This is the main page HTML:

    <div>
    <app-overview />
    </div>


    This is the component HTML:

    <div class="container">
    <div class="headline">
    <h2>...</h2>
    <div class="form-button-container"></div>
    </div>

    <div class="objects">
    ...
    <!-- objects -->
    </div>


    </div>
    <!-- </div> -->


    I was asking myself if the div component of the main page in Angular can be left out as well? Is this a worse solution?

    Continue reading...

Compartilhe esta Página