A
A
Aleaxander Burykin2017-06-04 17:00:57
Angular
Aleaxander Burykin, 2017-06-04 17:00:57

How to get an array of elements by class using @viewChild and @viewChildren?

there is a set of elements in the component that are not directives

<div class="someClass"></div>
<div class="someClass"></div>
<div class="someClass"></div>
<div class="someClass"></div>
<div class="someClass"></div>

how to access their `nativeElement` using `@viewChild` or `@viewChildren`
if you set the same local link to everyone, for example,
<div #someLink class="someClass"></div>
swears at duplicate links

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Stroykin, 2017-06-04
@burykinslams

It looks like this article is especially for you, link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question