Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does my browser interpret "<app-root>"?

I assume that <app-root> is from angular development. However, I was under the impression that frameworks solve into html/js/css as they compile.

When I open a angular page, in the source code and go to the <body>, I can only see the <app-root> tag. How does my browser read that?

Why can I not read the (html, should it not be?) source code?

like image 951
roman410 Avatar asked Jun 22 '26 23:06

roman410


1 Answers

Angular is a SPA (Single Page Application) framework. Basicaly, the app-root will be replaced in execution-time with the properly html/css/js when it's required, the whole thing is done internaly by the framework using javascript.

So, if you click to show the source code (CTRL + U on Windows), you will see only the app root. Of course, you can inspect the page with your browser console to see the "magic" going on.

You can understand better and more deep on the official documentation.

like image 148
Danilo Torchio Avatar answered Jun 24 '26 14:06

Danilo Torchio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!