@csvbox/angular_8
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

@csvbox/angular_8

Angular 8 adapter for csvbox.io

NPM JavaScript Style Guide

Shell

npm install @csvbox/angular_8

Import

Add CSVBoxAngularModule to your module imports

import { CSVBoxAngularModule } from "@csvbox/angular_8";

@NgModule({
  ...
  imports: [
    ...
    CSVBoxAngularModule
  ]
})

Usage

<csvbox-button [licenseKey]="licenseKey" [onImport]="onData.bind(this)" [user]="user">Import</csvbox-button>

Example

import { CSVBoxMethods } from "@csvbox/angular_8"

@Component({
  selector: 'app-root',
  template: `
    <csvbox-button
      [licenseKey]="licenseKey"
      [user]="user"
      [onImport]="onData.bind(this)">
      Import
    </csvbox-button>
  `
})

export class AppComponent implements CSVBoxMethods {

  title = 'example';
  licenseKey = 'YOUR_LICENSE_KEY_HERE';
  user = { user_id: 'default123' };

  onData(result: boolean, data: any) {
    if(result) {
      console.log("Sheet uploaded successfully");
      console.log(data.row_success + " rows uploaded");
    }else{
      console.log("There was some problem uploading the sheet");
    }
  }

}

Readme

For usage see the guide here - https://help.csvbox.io/getting-started#2-install-code

License

MIT © csvbox-io

Package Sidebar

Install

npm i @csvbox/angular_8

Weekly Downloads

21

Version

0.0.7

License

MIT

Unpacked Size

134 kB

Total Files

26

Last publish

Collaborators

  • ishwar5
  • aniketrane
  • csvbox-io