Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!