Giter VIP home page Giter VIP logo

angular-csv-import's Introduction

Build Status Built with Grunt

Angular CSV Import

Demo page

http://bahaaldine.github.io/angular-csv-import

Installation

Install depedencies using bower:

bower install angular-csv-import

Add js libraries to your application:

	...
	<script src="bower_components/angular-csv-import/dist/angular-csv-import.js"></script>
    ...

Add ngCSVImport module to you application

	...
	angular
	  .module('myAwesomeApp', [
	    ...
	    'ngCsvImport',
	    ...
	  ])
	...

Usage

Include the ng-csv-import element with its options:

<ng-csv-import content="csv.content"
	material
	md-button-class="md-icon-button md-raised md-accent"
	md-svg-icon="file:ic_file_upload_24px"
	header="csv.header"
	separator="csv.separator"
	result="csv.result"
	accept="csv.accept"></ng-csv-import>
  • multiple

If multiple attribute setted the directive will thow an error due a not implemented yet logic.

  • material

Attribute to tell to the directive to activate the material power!

  • md-button-class

Attribute to personalize the md-button inside the directive

  • md-svg-icon

The icon to show in md-button

  • csv.content

A variable which will contain the content loaded by the file input

  • csv.header

A variable that says whether or not the source CSV file contains headers

  • csv.headerVisible

A variable to toggle header visibility

  • csv.separator

A variable containing the separtor used in the CSV file

  • csv.separatorVisible

A variable to toggle separator visibility

  • csv.encoding

A variable to set the CSV file encoding

  • csv.encodingVisible

A variable to toggle encoding visibility

  • csv.result

A variable which will contain the result of the CSV to JSON marshalling.

  • csv.accept

An optional variable to limit what file types are accepted. Ex. ".csv" to only accept csv file types.

  • csv.acceptSize

An optional variable to limit the size of the files that are accepted in bytes. Ex. "1024" to only accept files up to 1kB.

  • csv.acceptSizeExceedCallback

An optional variable to pass in a callback to execute if the user attempted to upload a file larger than csv.acceptSize. Will run instead of parsing.

  • csv.callback

An optional variable to pass in a callback to execute once the file has been parsed. Will run following any successful parsing (ie change file, change separator, etc...).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.