• Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Angular component that lets you import and convert CSV file to JSON

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 separator 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...).

More Repositories

1

scalable-big-data-architecture

Assets used in Apress -- Scalable Big Data Architecture -- book
Scala
19
star
2

topology

A Kibana plugin to explore Elasticsearch Topology
JavaScript
17
star
3

angular-font-chart

Angularjs Font chart based on Font Awesome
JavaScript
14
star
4

timelion-google-analytics

Google analytics plugin for Timelion
JavaScript
13
star
5

elasticsearch-paris-accidentology-demo

Demonstrating ELK capabilities through Paris city accidentology use case
Python
7
star
6

angular-social-count

Angular component that simply counts social shares, likes, tweets ...etc.
HTML
5
star
7

elasticsearch-clickstream-demo

Python
4
star
8

docker-ldap

An OpenLDAP Docker image
Makefile
3
star
9

angular-odometer

Render HubSpot Odometer with Angular directive
JavaScript
3
star
10

docker-logstash-forwarder

A logstash forwarder Docker image
2
star
11

docker-elasticsearch

An Elasticsearch Docker image
Makefile
2
star
12

elasticsearch-meetup-rsvp-streaming-demo

An ELK demo focused on ingesting RSVPs from Meetup.com streaming API
Shell
2
star
13

spark-enrich-and-ml

A Spark driver that enrich apache logs data and build prediction on top of it
Scala
2
star
14

packt-kibana-5.0

Code and assets used in Kibana 5.0 from Packt
JavaScript
2
star
15

camel-gstorage

Google Cloud Storage camel component
Java
1
star
16

docker-logstash

A logstash Docker image
1
star
17

elastic-workbook

a site plugin that showcases Elasticsearch features through concrete examples
ApacheConf
1
star
18

docker-zookeeper

A Zookeeper Docker image
1
star
19

angular-fast-i18n

Simple & easy to use internationalization for angularjs
JavaScript
1
star
20

docker-kibana

A Kibana Docker image
1
star
21

angular-s3-upload

An angular directive that builds a file upload button for S3
JavaScript
1
star
22

docker-kafka

A kafka Docker image
1
star
23

timelion-google-api

Timelion functions for Google API time based data
JavaScript
1
star