Unexpected closed tag "div" angular2 HTML error

I am getting some errors in the console and not sure what the problem is in the HTML . Any help would be appreciated.

error_handler.js: 51 EXCLUSION: Not available (in promise): Error: Parse errors template: Unexpected closing tag "div" ("Click here to register [ERROR →]"): ResetPassword @ 22: 1 Error: Parse errors template: Unexpected closing tag "div" ("Click here to register [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> 
+7
html angular
source share
2 answers

You have one double quote too much in *ngIf="errorMessage && !successMessage"" :

 <div class="alert alert-dismissible alert-danger outer-top-xs" *ngIf="errorMessage && !successMessage"> <!--at the end of this line--> 
+8
source share

This error occurred when you open an item and do not close it. this error appears in this example:

 <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> 

As you can see, I am not closing the <ion-list> element (should be </ion-list> )

Be careful:

If you use any properties of an element with your own values, since the parser cannot process them, the element will be opened and this error will occur ("" in the above example).

+1
source share

All Articles