Last active
May 7, 2022 21:31
-
-
Save wh0th3h3llam1/5d50100ea1b8c242f503f96d601b6e9e to your computer and use it in GitHub Desktop.
Render `non_field_errors` in Angular Ant Design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<nz-alert nzType="error" [nzMessage]="nonFieldErrors" *ngIf="non_field_errors.length > 0" nzShowIcon> | |
<ng-template #nonFieldErrors> | |
<nz-list> | |
<nz-list-item *ngFor="let error of non_field_errors">{{ error }}</nz-list-item> | |
</nz-list> | |
</ng-template> | |
</nz-alert> | |
... | |
<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm(validateForm.value)"> | |
... | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment