2017-01-05 22 views
7

コンソールに何らかのエラーが表示されていますが、問題の原因がわからないのはHTMLです。どんな助けもありがとう。予期しない終了タグ "div" error angular2 HTML

error_handler.js:51 EXCEPTION: Uncaught (in promise): Error: Template parse errors: Unexpected closing tag "div" (" Click here to Signup [ERROR ->] "): [email protected]:1 Error: Template parse errors: Unexpected closing tag "div" (" Click here to Signup [ERROR ->] "): [email protected]: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> 

答えて

8

あなたが*ngIf="errorMessage && !successMessage"" 1つの二重引用符あまりにも多く持っている:

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

「タイプミス」の理由を使用した方が良い例はほとんどありません。 –

+0

@トーザザブロああ、そういうことはありますか?知りませんでした! :)はい、あなたは間違いなく正しいです – PierreDuc

+0

ああ私。ありがとうございました。 – Cookies

1

あなたは要素を開き、を閉じていない場合、このエラーが発生しました。

あなたが任意の要素のプロパティを使用する場合:あなたは、私が<ion-list>要素を閉じていない見たよう

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

注意してください(</ion-list>があるべき): このエラーは、この例に表示しますパーサがその値を処理できない場合、要素が開かれ、このエラーが発生します(上記の例では "")。

関連する問題