1.1.6 • Published 7 years ago

image-upload-button v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Image Upload Button

Image upload button component

Install

  1. install image-upload-button

    $ npm install image-upload-button --save

  2. Import it in appmodule

    import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { FileUploadButtonComponentModule } from 'image-upload-button';

    @NgModule({ declarations: AppComponent, , imports: BrowserModule, FileUploadButtonComponentModule , providers: [], bootstrap: AppComponent }) export class AppModule { }

Use it in your template

 <app-file-upload-button
    [fileSizeLimit]="'1000'"
    [buttonTitle]="'Upload File'"
    [errorMessage]="'File size is too long.'"
    (onChangeFile)="onChangeFile($event)">
    <div header><h1>My Test Header</h1></div>
    <div preview-template>
        <img src="./../favicon.ico">
    </div>
</app-file-upload-button>