Answer the question
In order to leave comments, you need to log in
How to call an angular 6 component in a tag to render it in the body tag?
Is it possible to display this component in the body tag when initializing a component in a tag other than body?
<body>
<p>
<my-component/>
</p>
</body>
<body>
<my-component/>
<p>
</p>
</body>
Answer the question
In order to leave comments, you need to log in
The article helped - https://blog.angularindepth.com/angular-cdk-portal...
Examples are implemented there both in native angular and using cdk angular (portal)
<non-body tag>
<component-selector>component-selector>
non-body tag>
In Angular, everything is placed in a Body. Your app component is loaded into it. further all nested components nested in App will be in Body.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question