A fileupload component based on angular-material design
npm install angular-material-fileupload-gongon2A fileupload component based on angular-material design
angular-material-fileupload API doc
The module to be imported is "MatFileUploadModule"
``Typescript
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MatButtonModule } from '@angular/material';
import { AppComponent } from './app.component';
import { MatFileUploadModule } from 'angular-material-fileupload';
@NgModule({
imports: [
MatButtonModule,
BrowserModule,
MatFileUploadModule
],
declarations: [
AppComponent
],
bootstrap: [ AppComponent ]
})
export class AppModule { }
`
`HTML
[httpUrl]="'http://localhost:8180/jax-rs-jersey-application-sample'">
`
Notes
- 'fileUploadQueue' is the template input variable which point to the queue. You can see its created in the queue tag (#fileUploadQueue). Basically pointing the input to the queue
- fileAlias and httpUrl are input variables which you can bind. 'fileAlias' - as you might guess just the alias of the file. and 'httpUrl' is the url you want to do POST with multipart data.
`HTML
`
`HTML
`
`HTML
``