意外的结束标记“div”错误angular2 HTML [英] Unexpected closing tag "div" error angular2 HTML
问题描述
我在控制台中发现了一些错误,不确定在 HTML
中存在什么问题。
$ b
I'm getting some errors in the console and not sure what is the issue is in the HTML
. Any help would be appreciated.
error_handler.js:51 EXCEPTION:未捕获(承诺):错误:模板
解析错误:意外结束标签div(点击这里注册
[错误 - >]):ResetPassword @ 22:1错误:模板
解析错误:意外关闭标签div(点击此处注册
[错误 - >]):ResetPassword @ 22:1
error_handler.js:51 EXCEPTION: Uncaught (in promise): Error: Template parse errors: Unexpected closing tag "div" (" Click here to Signup [ERROR ->] "): ResetPassword@22:1 Error: Template parse errors: Unexpected closing tag "div" (" Click here to Signup [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">×</button>
{{errorMessage}}
</div>
<div class="alert alert-dismissible alert-success outer-top-xs" *ngIf="successMessage">
<button type="button" class="close" data-dismiss="alert">×</button>
{{successMessage}}
</div>
<div class="outer-top-xs">
<a [routerLink]="['/getstarted']">Click here to Signup</a>
</div>
</div>
</section>
推荐答案
c $ c> * ngIf =errorMessage&& !successMessage:
You've got one double quote too many at *ngIf="errorMessage && !successMessage""
:
<div class="alert alert-dismissible alert-danger outer-top-xs" *ngIf="errorMessage && !successMessage">
<!--at the end of this line-->
这篇关于意外的结束标记“div”错误angular2 HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!