-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Hi,
I want to do something like:
The parent component displays the number of its children components of a specific type.
An example:
// Should display 3
<Parent>
<div>{{ numOfChildComponents }}</div>
<Child></Child>
<Child></Child>
<Hello></Hello>
<Child></Child>
</Parent>
How should I achieve this?
I saw an implementation to assign a specific class to the children,
and then in the parent component it uses jQuery to find out the children of that class.
This works but I'm wondering if there is less jQuery or DOM approach to achieve this?
Metadata
Metadata
Assignees
Labels
No labels