A
A
Anna Gera2018-08-15 19:49:11
Angular
Anna Gera, 2018-08-15 19:49:11

How to output multiple child components in one parent Angular?

Good afternoon!
I need to display several child components in one component.
Those.

import { Component } from '@angular/core';
@Component({
selector: 'memanager',
templateUrl: './melist/melist.component.html ', → and some more
})
export class MemanagerComponent {}
Who knows how to implement this? THANKS in advance to those who respond

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Luzanov, 2018-08-15
@AnnaGera

In the container template (/melist/melist.component.html) and output like this:

<main>
  <section>
    <child-component></child-component>
  </section>

  <another-child-component></another-child-component>
</main>

Where child-component and another-child-component are child component selectors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question