I'm trying to create an Angular reusable button component. Right now, it is used like so:
[label]="'button label'"
>
The template for fun-button looks like this:
So far, so good. Everything works.
Now I would like to modify fun-button so that it is used more like an HTML button:
child button label
How can I access fun-button's DOM children, which in this case is the string 'child button label'?
Is such a thing even possible? I've seen a bunch of answers that involve tagging the child elements, but in my case I want to accept any arbitrary children.
Thanks!
EDIT, WITH ANSWER:
Turned out to be incredibly easy, thanks MikeOne. Just made the template look like this:
And then use like this:
child button label
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)