I am trying to build a custom component using multiple ng-content
in Angular 6, but this is not working and I have no idea why.
This is my component code
To fit the Web Component specs. Even if that's Angular. It's about avoiding attributes for selector like Angular directives or reserved attributes with another use. So, we just use the "slot" attribute. We'll see
as
.
Example:
hello-world.component.html
Hello World
app.component.html
This is a
example.
Result
This is a Hello World example.
You can use any name you want like "banana" or "fish". But "start" and "end" are a good convention to place elements before and after.