Angular UI Components Documentation
The Angular FileUpload enables users to select files and upload them to a server. This guide adds the Angular FileUpload (jqxFileUpload) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxfileupload 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxFileUploadModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxFileUploadModule } from 'jqwidgets-ng/jqxfileupload';
@Component({
selector: 'app-root',
imports: [jqxFileUploadModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxFileUpload
[width]="300" [uploadUrl]="'imageUpload.php'" [fileInputName]="'fileToUpload'">
</jqxFileUpload>
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxFileUploadModule } from 'jqwidgets-ng/jqxfileupload';
@Component({
imports: [CommonModule, jqxFileUploadModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, select: This event is triggered when a file has been selected.
<jqxFileUpload (onSelect)="onSelect($event)"></jqxFileUpload>
onSelect(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, refresh: Refreshes the widget.
<jqxFileUpload #myFileUpload></jqxFileUpload>
import { Component, viewChild } from '@angular/core';
import { jqxFileUploadModule, jqxFileUploadComponent } from 'jqwidgets-ng/jqxfileupload';
@Component({
selector: 'app-root',
imports: [jqxFileUploadModule],
templateUrl: './app.html'
})
export class App {
readonly myFileUpload = viewChild.required<jqxFileUploadComponent>('myFileUpload');
run(): void {
this.myFileUpload().refresh();
}
}