mirror of
https://github.com/a-mayb3/KanbanCloneAngular.git
synced 2026-03-21 18:05:38 +01:00
substituted @ifs and @fors with deprecated ngIf and ngFor
This commit is contained in:
parent
171400f9ca
commit
7202ed8806
15 changed files with 105 additions and 110 deletions
|
|
@ -2,13 +2,13 @@
|
|||
<div class="card">
|
||||
<h1>Edit project</h1>
|
||||
|
||||
@if (errorMessage()) {
|
||||
<div class="error">{{ errorMessage() }}</div>
|
||||
}
|
||||
<div class="error" *ngIf="errorMessage()">{{ errorMessage() }}</div>
|
||||
|
||||
@if (isLoading()) {
|
||||
<ng-container *ngIf="isLoading(); else formContent">
|
||||
<p class="loading">Loading project...</p>
|
||||
} @else {
|
||||
</ng-container>
|
||||
|
||||
<ng-template #formContent>
|
||||
<form (ngSubmit)="onSubmit()" #projectForm="ngForm">
|
||||
<div class="form-group">
|
||||
<label for="name">Project name</label>
|
||||
|
|
@ -41,14 +41,11 @@
|
|||
class="btn-primary"
|
||||
[disabled]="isSaving() || !projectForm.form.valid"
|
||||
>
|
||||
@if (isSaving()) {
|
||||
<span>Saving...</span>
|
||||
} @else {
|
||||
<span>Save changes</span>
|
||||
}
|
||||
<span *ngIf="isSaving(); else saveText">Saving...</span>
|
||||
<ng-template #saveText><span>Save changes</span></ng-template>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue