Un début d'ajout pour uploader des images
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<form [formGroup]="imgForm" (ngSubmit)="onSubmit(imgForm.value)" autocomplete="off" style="padding: 10px;">
|
||||
<p>
|
||||
<input type="file" #fileUpload id="fileUpload" name="fileUpload" accept="image/*" style="display: none"
|
||||
formControlName="image" (change)="onFileChanged($event)" />
|
||||
<button (click)="fileUpload.click()">Select File</button>
|
||||
</p>
|
||||
<p>
|
||||
<mat-form-field>
|
||||
<mat-label>Comment about the image</mat-label>
|
||||
<input matInput type="text" formControlName="comment" />
|
||||
</mat-form-field>
|
||||
</p>
|
||||
|
||||
<button mat-button color="warn" type="submit">
|
||||
<mat-icon>file_upload</mat-icon>
|
||||
Upload image
|
||||
</button>
|
||||
</form>
|
||||
Reference in New Issue
Block a user