fix [(ngModel)] bug where meta was not overridden on put;
This commit is contained in:
parent
5012c8943f
commit
3550076756
@ -12,34 +12,46 @@
|
||||
|
||||
<mat-form-field class="margin-right">
|
||||
<mat-label>* Name</mat-label>
|
||||
<input matInput
|
||||
<input matInput *ngIf="meta"
|
||||
placeholder="Name"
|
||||
[(ngModel)]="meta ? meta.name : name">
|
||||
[(ngModel)]="meta.name">
|
||||
<input matInput *ngIf="!meta"
|
||||
placeholder="Name"
|
||||
[(ngModel)]="name">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="margin-right">
|
||||
<mat-label>Tag</mat-label>
|
||||
<input matInput
|
||||
<input matInput *ngIf="meta"
|
||||
placeholder="Add a tag"
|
||||
[(ngModel)]="meta ? meta.tag : tag">
|
||||
[(ngModel)]="meta.tag">
|
||||
<input matInput *ngIf="!meta"
|
||||
placeholder="Add a tag"
|
||||
[(ngModel)]="tag">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="mode==='post'"
|
||||
class="margin-right"
|
||||
>
|
||||
<mat-label>* Longitude</mat-label>
|
||||
<input matInput
|
||||
<input matInput *ngIf="meta"
|
||||
placeholder="Add longitude"
|
||||
[(ngModel)]="meta ? meta.longitude : longitude">
|
||||
[(ngModel)]="meta.longitude">
|
||||
<input matInput *ngIf="!meta"
|
||||
placeholder="Add longitude"
|
||||
[(ngModel)]="longitude">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="mode==='post'"
|
||||
class="margin-right"
|
||||
>
|
||||
<mat-label>* Latitude</mat-label>
|
||||
<input matInput
|
||||
<input matInput *ngIf="meta"
|
||||
placeholder="Add latitude"
|
||||
[(ngModel)]="meta ? meta.latitude : latitude">
|
||||
[(ngModel)]="meta.latitude">
|
||||
<input matInput *ngIf="!meta"
|
||||
placeholder="Add latitude"
|
||||
[(ngModel)]="latitude">
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button"
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
<div style="display: block; width: 100%">
|
||||
<h3>Metadata:</h3>
|
||||
<p *ngIf="image.filename">filename: {{image.filename}}</p>
|
||||
<p *ngIf="image.tag">tag: {{image.tag}}</p>
|
||||
<!-- <p *ngIf="image.tag">tag: {{image.tag}}</p>-->
|
||||
<p *ngIf="image.latitude">latitude: {{image.latitude}}</p>
|
||||
<p *ngIf="image.longitude">longitude: {{image.longitude}}</p>
|
||||
<p *ngIf="image.version">version: {{image.version}}</p>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
<mat-tab-group *ngIf="images">
|
||||
<mat-tab-group *ngIf="storageHealth; else loading">
|
||||
<mat-tab label="Images">
|
||||
<app-images [images]="images" (reload)="loadImages()"></app-images>
|
||||
</mat-tab>
|
||||
@ -14,3 +14,7 @@
|
||||
<app-map [images]="images"></app-map>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
<ng-template #loading>
|
||||
Loading ...
|
||||
</ng-template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user