title: Get element which is in the recursion angular4?
body: <p>I have a component as shown and I generated the structure using recursion</p>
  
  <pre><code>&lt;component&gt;
     &lt;div class="a"&gt;
     &lt;component&gt;
        &lt;div class="a"&gt;
           &lt;component&gt;
               &lt;div class="a"&gt;&lt;/div&gt;
           &lt;/component&gt;
        &lt;/div&gt;
      &lt;/component&gt;
      &lt;/div&gt;
  &lt;/component&gt;
  </code></pre>
  
  <p>In each instance of the component(in <code>ngAfterViewInit</code> or <code>ngAfterViewChecked</code>), I want to get the element with class <code>a</code> which is specific to that particular instance. I don't want the class <code>a</code> element which is belongs to parent or child instance. How can I get the element?</p>