I have the following DOM structure
<div #carousalElement>
<div class="singleCaousalElement">
<a>
<img [src]="carousalURL1" class="carousalImage">
</a>
</div>
<div class="singleCaousalElement">
<a>
<img [src]="carousalURL2" class="carousalImage">
</a>
</div>
</div>
I can get the all divs with carousalElements
class using the ViewChildren
@ViewChildren('carousalElement') carousalElements;
PROBLEM: When I dynamically add a new div
under the #carousalElement
div, it does not show up under the carousalElements
array.
Am I missing something obvious?