I have a file type input which I want a cancel button to be enabled when a file is loaded, I've already tried but it doesn't give me the head for more.
<p-fileUpload mode="basic" name="demo[]" url="./upload.php" accept=".doc,.docx,.pdf" maxFileSize="1000000" chooseLabel="Seleccionar" [disabled]="campos" [(ngModel)]="constancia" #arch_constancia></p-fileUpload>
and my button is as follows:
<button [disabled]="campos || true" pButton pRipple [label]="Delete" icon="pi pi-trash" class="p-button-danger" (click)="borrar_constancia()"></button>
I have the button disabled but I don't know how to enable it when a file is loaded, if you could help me please, I do it in angular typescript.
You could do it like this: