0.0.4 • Published 1 year ago

ngx-simple-upload v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Angular Simple Upload File

An angular module for file uploads. A simple skeleton that you can easily add to, no extra features, just easy to style upload button.

Installation

Install Angular Material UI

ng add @angular/material

Install the library:

npm install ngx-simple-upload

Usage

In your module:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { SimpleUploadFileModule } from '@nampham/ngx-simple-upload-file';

@NgModule({
declarations: [
    AppComponent
],
imports: [
    BrowserModule,
    SimpleUploadFileModule, <<< Import the module
    BrowserAnimationsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

In your component HTML file:

<ngx-simple-upload-file (filesSelected)="onFilesSelected($event)"></ngx-simple-upload-file>

Inputs:

InputDefault valueValue typeDescription
requiredFileType''StringExact same as HTML \ accept Attribute
multiplefalseBooleanIf 'true', allow to select multiple files.
btnIcon'attach_file'StringAngular Material icons
label'No file uploaded yet.'StringCustom label

Events:

EventDescriptionReturn
(filesSelected)Occurs when the files are changed.FileList
0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago