Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
The template of app-root component is not repeating upon multiple references of app-root tag in index.html

I have generated the base Angular application using angular-cli and the application is loading fine. Then I have repeated app-root in index.html but surprisingly the app-root component template is not visible twice, the template is displayed only once. Even if I refer app-root component multiple times, the template is appearing only once. Below is my code.

<body>
  <app-root></app-root>
  <app-root></app-root>
</body>

However I can see the multiple app-root tags in the Elements section while inspecting through chrome developer tools. Why the template of app-root is not getting repeated as many times as I refer app-root tag in index.html file?

Inspect Elements

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

That app-root component is your root bootstrap component so mentioning it multiple times is not gonna do anything, angular will look for first reference of app-root in html and will treat it as starting point of your application.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda