意外的结束标记"div"错误angular2 HTML

Coo*_*ies 11 html angular

我在控制台中遇到了一些错误,并且不确定问题是什么HTML.任何帮助,将不胜感激.

error_handler.js:51 EXCEPTION:未捕获(在保证中):错误:模板解析错误:意外结束标记"div"("单击此处注册[错误 - >]"):ResetPassword @ 22:1错误:模板解析错误:意外的结束标记"div"("单击此处注册[ERROR - >]"):ResetPassword @ 22:1

<section class="reset-password">
<div class="container container-responsive inner-top-xs">
    <form [formGroup]="resetPasswordForm" (ngSubmit)="resetPassword(resetPasswordForm.value, resetPasswordForm.valid)">
        <h4>Please enter your e-mail address and a temporary password will be sent to you.</h4>
        <div class="form-group">
            <label class="control-label" for="email">Email</label>
            <input type="text" formControlName="email" required class="form-control" id="email" placeholder="Email">
            <validation-message [control]="resetPasswordForm.controls.email"></validation-message>
        </div>
        <button type="submit" class="btn btn-flat__blue outer-top-xs" [disabled]="!resetPasswordForm.valid">RESET PASSWORD</button>
    </form>
    <div class="alert alert-dismissible alert-danger outer-top-xs" *ngIf="errorMessage && !successMessage"">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
      {{errorMessage}}
    </div>
    <div class="alert alert-dismissible alert-success outer-top-xs" *ngIf="successMessage">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
      {{successMessage}}
    </div>
    <div class="outer-top-xs">
        <a [routerLink]="['/getstarted']">Click here to Signup</a>
    </div>
</div>
</section>
Run Code Online (Sandbox Code Playgroud)

Pie*_*Duc 12

你有太多的双引号*ngIf="errorMessage && !successMessage"":

<div class="alert alert-dismissible alert-danger outer-top-xs" *ngIf="errorMessage && !successMessage"> 
<!--at the end of this line-->
Run Code Online (Sandbox Code Playgroud)


Ima*_*our 5

当您打开一个元素但不关闭它时会发生此错误。此错误显示在此示例中:

<ion-list *ngSwitchCase="'facilities'">
 <ion-item *ngFor="let facility of facilities">
  <ion-icon name="facility.Icon" item-start></ion-icon>
  {{facility.Name}}
  <ion-icon color="red" name="rose" item-end></ion-icon>
 </ion-item> 
<ion-list>
Run Code Online (Sandbox Code Playgroud)

如您所见,我没有关闭<ion-list>元素(应该是</ion-list>

当心:

如果您使用任何元素属性及其值,因为解析器无法处理它们,则该元素将被打开并发生此错误(“”在上面的示例中)。