'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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yogi |

