在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):nishantmc/angular-material-fileupload开源软件地址(OpenSource Url):https://github.com/nishantmc/angular-material-fileupload开源编程语言(OpenSource Language):TypeScript 84.0%开源软件介绍(OpenSource Introduction):angular-material-fileuploadA fileupload component based on angular-material design Documentationangular-material-fileupload API doc DemoSetupThe module to be imported is "MatFileUploadModule" 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 { } File upload Example<label for="singleFile">Upload file</label>
<input id="singleFile" type="file" [fileUploadInputFor]= "fileUploadQueue"/>
<br>
<mat-file-upload-queue #fileUploadQueue
[fileAlias]="'file'"
[httpUrl]="'http://localhost:8180/jax-rs-jersey-application-sample'">
<mat-file-upload [file]="file" [id]="i" *ngFor="let file of fileUploadQueue.files; let i = index"></mat-file-upload>
</mat-file-upload-queue> Notes
Drag and drop example<div [fileUploadInputFor]="fileUploadQueue" class="upload-drop-zone">
Just drag and drop files here
</div>
<div style="width: 500px">
<mat-file-upload-queue #fileUploadQueue
[fileAlias]="'file'"
[httpUrl]="'http://localhost:8180/jax-rs-jersey-application-sample'" multiple>
<mat-file-upload [file]="file" [id]="i" *ngFor="let file of fileUploadQueue.files; let i = index"></mat-file-upload>
</mat-file-upload-queue>
</div> Example setting the inputs on mat-file-upload-queue<div [fileUploadInputFor]="fileUploadQueue3" class="upload-drop-zone">
Just drag and drop files here
</div>
<div style="width: 500px">
<mat-file-upload-queue
#fileUploadQueue3
[httpUrl]="'http://localhost:8080/jax-rs-jersey-application-sample'"
fileAlias="{{ fileAlias }}"
[httpRequestHeaders]="httpRequestHeaders"
[httpRequestParams]="httpRequestParams"
>
<mat-file-upload
[file]="file"
[id]="i"
*ngFor="let file of fileUploadQueue3.files; let i = index"
></mat-file-upload>
</mat-file-upload-queue>
</div> Example setting the inputs overridden on mat-file-upload<div [fileUploadInputFor]="fileUploadQueue4" class="upload-drop-zone">
Just drag and drop files here
</div>
<div style="width: 500px">
<mat-file-upload-queue
#fileUploadQueue4
[httpUrl]="'http://localhost:8080/jax-rs-jersey-application-sample1'"
fileAlias="{{ fileAlias }}"
[httpRequestHeaders]="httpRequestHeaders"
[httpRequestParams]="httpRequestParams"
>
<mat-file-upload
[file]="file"
[id]="i"
*ngFor="let file of fileUploadQueue4.files; let i = index"
[httpUrl]="'http://localhost:8080/jax-rs-jersey-application-sample'"
fileAlias="{{ fileAlias1 }}"
[httpRequestHeaders]="httpRequestHeaders1"
[httpRequestParams]="httpRequestParams1"
></mat-file-upload>
</mat-file-upload-queue>
</div>
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论