uppload-angular
Official Angular component for Uppload
Last updated a year ago by anandchowdhary .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install uppload-angular 
SYNC missed versions from official npm registry.

Uppload Angular

Uppload Angular is the official Angular component for Uppload, the open-source file uploading widget.

Installation

yarn add uppload-angular

Usage

Import module

import { UpploadModule } from 'uppload-angular';

@NgModule({
  imports: [
    ...
    UpploadModule,
  ]
})
export class AppModule {}
import { Component } from '@angular/core';
import { UpploadEvents, UpploadSettings } from 'uppload-angular';

@Component({
  selector: 'app-root',
  template: `
    <uppload [settings]="settings" (event)="handleEvent($event)">
      <button class="btn" data-uppload-button>Upload</button>
    </uppload>
  `,
})
export class AppComponent {
  public settings: UpploadSettings = {
    crop: { aspectRatio: 1 },
    uploadFunction: () => {
      return new Promise(resolve => {
        resolve('https://randomuser.me/api/portraits/men/18.jpg');
      });
    }
  };

  handleEvent({ event, payload }) {
    console.log(`Handle event`, { event, payload });
  }
}

Current Tags

  • 1.2.1                                ...           latest (a year ago)

10 Versions

  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (0)
None
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |