in Education by
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)

1 Answer

0 votes
by
Made the template look like this: And then use like this: child button label

Related questions

0 votes
    I want a way to log in and store a users details (maybe in a cookie?) securely using JavaScript. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How to split a string with angularJS (4 answers) Closed 5 years ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How to split a string with angularJS (4 answers) Closed 5 years ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How to split a string with angularJS (4 answers) Closed 5 years ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 19, 2022 in Education by JackTerrance
0 votes
    This is part of the component : import MyComp from '../../lib/MyComp' const Data = ( { data } ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    This is part of the component : import MyComp from '../../lib/MyComp' const Data = ( { data } ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I have a simple components: const Sidebar = (props) => { ... } const SidebarLink = (props) => ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have a component billing that includes ngb-tabset component of Ng Bootstrap. ngb-tabset has the following ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    I have a component billing that includes ngb-tabset component of Ng Bootstrap. ngb-tabset has the following ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I have a component billing that includes ngb-tabset component of Ng Bootstrap. ngb-tabset has the following ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    Different JavaScript Questions and Answers...
asked Sep 17, 2022 in Technology by Editorial Staff
0 votes
    I've created a getSpectrum method using the getByteFrequencyData method on the Web Audio API's Analyser Node ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 27, 2022 in Education by JackTerrance
0 votes
    Have jquery dialog as closeOnescape as false. want to trigger an event based on esc key press how do ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am trying to convert string into integer using jquery but it throwing NumberFormatException. How to fix it ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    Angular js Image upload how to check width and height example my withd=200 and heidht =200 if give ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
...