title: What causes this error message in my Angular template: ERROR in E parsing template: Unexpected closing tag "div"
body: <p>This is my html template file:</p>
  
  <pre><code>&lt;div class="container"
      fxLayout="row wrap"
      fxLayout.sm="column"
      fxLayout.xs="column"
      fxLayoutAlign.gt-md="space-around center"
      fxLayoutGap="10px" 
      fxLayoutGap.xs="0"&gt;
  
    &lt;div fxFlex="100" dir="rtl"&gt;
      &lt;div&gt;
        &lt;h3 *ngIf=""&gt;اطلاعات کاربر&lt;/h3&gt;
        &lt;hr&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div fxFlex="40" *ngIf="user" [@visibility]="visibility" [@expand]&gt;
      &lt;mat-card&gt;
        &lt;mat-card-header&gt;
          &lt;mat-card-title&gt;
            &lt;h3&gt;{{user.firstname | uppercase}}&lt;/h3&gt;
          &lt;/mat-card-title&gt;
        &lt;/mat-card-header&gt;
        &lt;img mat-card-image src="{{ baseURL + default_user.filename}}" &gt;
        &lt;mat-card-content&gt;
          &lt;p&gt;{{user.lastname}}&lt;/p&gt;
        &lt;/mat-card-content&gt;
    &lt;/div&gt;
  
    &lt;div fxFlex="40" *ngIf="user" [@visibility]="visibility" [@expand]&gt;
      &lt;mat-list&gt;
        &lt;h3&gt;مشخصات&lt;/h3&gt;
        &lt;mat-list-item &gt;
          &lt;h4 matLine&gt; {{user.firstname}} &lt;/h4&gt;
          &lt;p matLine&gt; {{user.lastname&lt;/p&gt;
              &lt;!--
          &lt;p matLine&gt;
            &lt;span&gt; -- {{comment.author}} {{comment.date | date }} &lt;/span&gt;
          &lt;/p&gt;
              --&gt;
  
        &lt;/mat-list-item&gt;
      &lt;/mat-list&gt;
    &lt;/div&gt;
    &lt;div [hidden]="user || errMess"&gt;
        &lt;mat-spinner&gt;&lt;/mat-spinner&gt;&lt;h4&gt;Loading . . . Please Wait&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div *ngIf="errMess"&gt;
      &lt;h2&gt;Error&lt;/h2&gt;
      &lt;h4&gt;{{errMess}}&lt;/h4&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;!--
          &lt;form novalidate [formGroup]="commentForm" #cform="ngForm" (ngSubmit)="onSubmit()"&gt;
        &lt;p&gt;
          &lt;mat-slider min="1" max="5" step="1" thumbLabel tickInterval="1" name="rating" formControlName="rating"&gt;&lt;/mat-slider&gt;
          &lt;mat-form-field class="full-width"&gt;
            &lt;textarea matInput formControlName="comment" placeholder="Your Comment" rows=12&gt;&lt;/textarea&gt;
            &lt;mat-error *ngIf="formErrors.comment"&gt;{{formErrors.comment}}&lt;/mat-error&gt;
          &lt;/mat-form-field&gt;
        &lt;/p&gt;
        &lt;button type="submit" mat-button class="background-primary text-floral-white" [disabled]="commentForm.invalid"&gt;Submit&lt;/button&gt;
      &lt;/form&gt;
  --&gt;
  </code></pre>
  
  <p>And this is the error I get:</p>
  
  <pre><code>ERROR in Errors parsing template: Unexpected closing tag "div". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("
          &lt;/p&gt;
        &lt;/mat-card-content&gt;
    [ERROR -&gt;]&lt;/div&gt;
  
    &lt;div fxFlex="40" *ngIf="user" [@visibility]="visibility" [@expand]&gt;
  "): C:/Users/m/Desktop/SEP/version1-frontend/src/app/users/users.component.html@27:2, Unexpected closing tag "div". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("
      &lt;h4&gt;{{errMess}}&lt;/h4&gt;
    &lt;/div&gt;
  [ERROR -&gt;]&lt;/div&gt;
  
  &lt;!--
  "): C:/Users/m/Desktop/SEP/version1-frontend/src/app/users/users.component.html@52:0
  </code></pre>
  
  <p>What is the problem and why do I get this error message? I checked a couple of time each tags and it seems everything is ok and also i have no errors in my V code IDE but when I run the program by <code>npm start</code> I get the above error message! Please help me know what is the provlem and how can I solve it?</p>