You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
728 B
HTML
20 lines
728 B
HTML
<form [formGroup]="uploadForm" (submit)="onSubmit($event)">`
|
|
<label>
|
|
<input type="file" (change)="selectImage($event)" accept="image/*" style="display:none"/>
|
|
<img *ngIf="previewDataUrl" [src]="previewDataUrl" style="width:50px; height: 50px;" />
|
|
<a *ngIf="!previewDataUrl" ion-button color="secondary">
|
|
Select a Photo
|
|
</a>
|
|
</label>
|
|
<ion-item>
|
|
<ion-label position="floating" color="primary">Caption</ion-label>
|
|
<ion-input type="text" formControlName="caption" required></ion-input>
|
|
</ion-item>
|
|
<ion-button
|
|
color="primary"
|
|
type="submit"
|
|
[disabled]="!uploadForm.valid || !file">
|
|
Post
|
|
</ion-button>
|
|
</form>
|