title: Accessing form Array values to display Mat Error
body: <p>FormGroup    </p>
  
  <pre><code>this.locationForm = this.formBuilder.group({
            locationName: new FormControl(null, Validators.required),
            locationURL: new FormControl(null, Validators.required),
            workTiming: this.formBuilder.array([
              this.formBuilder.group({
                beginTime: new FormControl(null,Validators.required),
              })
            ])
          })
  </code></pre>
  
  <p>HTML CODE:</p>
  
  <pre><code>&lt;div formArrayName="workTiming" &gt;
           &lt;div *ngFor="let item of workTiming.controls;                  
                        let pointIndex=index" [formGroupName]="pointIndex"&gt;
              &lt;div class="container"&gt;
              &lt;mat-form-field class="responsive"&gt;
                  &lt;input type="time" required formControlName="beginTime" matInput placeholder="Begin Time"&gt;
                  &lt;mat-error *ngIf="workTiming.get('beginTime').hasError('required')"&gt; Enter begin time &lt;/mat-error&gt;
              &lt;/mat-form-field&gt;
            &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I need some help on how to access the formControl name of 'beginTime' inside mat-error, since i'm using the formArray, I'm not sure on how to access it. If I give like in the code I get the error as follows</p>
  
  <pre><code>ERROR TypeError: Cannot read property 'hasError' of null
  </code></pre>