title: How to get all elements by class name in Angular 8 from the typescript file
body: <p>I try to get all elements by class name  from HTML template,in the TS File.
  This is what i tried so far.</p>
  
  <pre><code>
  
   &lt;div class="form-group" &gt;
              &lt;label class="name"  class="col-sm-2 control-label" [attr.for]="'skillName' + i"&gt;
                {{ arr[i]}} {{ i }}
              &lt;/label&gt;
            &lt;/div&gt;
  
    ngAfterViewInit()
    {
      let el = this.document.getElementsByClassName('name');
      console.log(el)
      console.log("*")
    }
  
  
  </code></pre>