0.1.0 • Published 6 years ago

@zhiguang/ng-file-input v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

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 );
  }
}
0.1.0

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago