image-upload-button
v1.1.6
Published
Image upload button component
Downloads
7
Maintainers
Readme
Image Upload Button
Image upload button component
Install
install image-upload-button
$ npm install image-upload-button --save
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>