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

201
Vistas
Angular how to check from which component is a div

I'm interested in how to check in console which component was rendered. I mean, let's assume that in console -> Elements you can see a lot of divs, for example. How can you check from which component are this divs coming?

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

0

@Component({
    selector: 'my-component',
    template: '<div><div></div></div>'
})
export class MyComponent {
...
}

If you add the component above in your app, you should be able to see <my-component>...</my-component> in your DevTools > Elements panel.

You can also use the Angular DevTools extension to explore the HTML of your components.

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can simply inspect the HTMLin Chromes' Dev Tools. Simply by right-clicking and selecting inspect. In the Elements section where all of the page's HTML is shown you can see different <div> etc. If you observe it closely there are also tags of components that are used by angular to display those <div>.

For example, in the simple stackblitz Angular project. Simple inspection of the HTML will show us this

Example Image for Inspection

Here you can see that <h1> is inside the hello-component of Angular which is shown by <hello .... > tag. Which is inside another component my-app-component called <my-app...>. By this logic, you can easily see which HTML is inside which Angular Component

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