@zhiguang/ng-file-input
v0.1.0
Published
Downloads
3
Readme
Example
import module
import { NgFileInputModule } from '@zhiguang/ng-file-input';
@NgModule({
imports: [
//...
NgFileInputModule,
],
})
...
demo page
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'page-ng-file-input',
templateUrl: `
<ng-file-input
name="images"
sourceType="camera"
fileType="image/*"
maxSize="2048"
[disabled]="false"
[hidden]="false"
(onError)="onError($event)"
(onChange)="onChange($event)">
</ng-file-input>
`,
styles: []
})
export class PageNgFileInputComponent implements OnInit {
constructor() { }
ngOnInit() {
}
onChange( res:any ) {
console.log( res );
}
onError( e:any ) {
console.log( e );
}
}