All Projects → SparrowJang → Ngfilereader

SparrowJang / Ngfilereader

Licence: mit
This is file reader component on angular.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ngfilereader

Reef
A lightweight library for creating reactive, state-based components and UI.
Stars: ✭ 700 (+2700%)
Mutual labels:  angularjs
Beautifulweather
A simple weather forecast app developed with AngularJS.
Stars: ✭ 5 (-80%)
Mutual labels:  angularjs
Angular Google Chart
Google Chart Tools AngularJS Directive Module
Stars: ✭ 899 (+3496%)
Mutual labels:  angularjs
Angularjs Styleguide
AngularJS styleguide for teams
Stars: ✭ 6,067 (+24168%)
Mutual labels:  angularjs
Must Watch Javascript
A useful list of must-watch talks about JavaScript
Stars: ✭ 6,545 (+26080%)
Mutual labels:  angularjs
Globaleaks
GlobaLeaks is free, open source software enabling anyone to easily set up and maintain a secure whistleblowing platform.
Stars: ✭ 832 (+3228%)
Mutual labels:  angularjs
Microservices Event Sourcing
Microservices Event Sourcing 是一个微服务架构的在线购物网站,使用Spring Boot、Spring Cloud、Spring Reactor、OAuth2、CQRS 构建,实现了基于Event Sourcing的最终一致性,提供了构建端到端微服务的最佳实践
Stars: ✭ 657 (+2528%)
Mutual labels:  angularjs
Mean Angular5 Passport Authentication
Securing MEAN Stack (Angular 5) Web Application using Passport Authentication
Stars: ✭ 24 (-4%)
Mutual labels:  angularjs
Angular Bootstrap Calendar
A port of the bootstrap calendar widget to AngularJS (no jQuery required!)
Stars: ✭ 803 (+3112%)
Mutual labels:  angularjs
Buka
Buka is a modern software that helps you manage your ebook at ease.
Stars: ✭ 896 (+3484%)
Mutual labels:  reader
Threema Web
The Threema Web application.
Stars: ✭ 745 (+2880%)
Mutual labels:  angularjs
Light Novel Library wenku8 android
[CASUALLY MAINTAINED] 轻小说文库 (Wenku8.com) 安卓版第三方公益App,始于2014年的Material Design风格、无广告、不盈利、Google Play上安装包最小的轻小说阅读器(light novel reader)。目前除了网站的API以外,还添加了我自己架的Cloudflare Worker 中继节点用来突破网站API的限制 wenku8-relay.mewx.org.
Stars: ✭ 772 (+2988%)
Mutual labels:  reader
Angular Prest
pREST component for Angular
Stars: ✭ 16 (-36%)
Mutual labels:  angularjs
Angular Validation
[INACTIVE] Client Side Validation for AngularJS 1. (You should use version > 2 💥)
Stars: ✭ 714 (+2756%)
Mutual labels:  angularjs
Movement
Movement is an easier, simpler way to explore and use NIEM. Want to join the Movement and contribute to it? Start here.
Stars: ✭ 19 (-24%)
Mutual labels:  angularjs
Angular Chosen
AngularJS Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a AngularJS way
Stars: ✭ 695 (+2680%)
Mutual labels:  angularjs
Todo List App
Spring Boot 1.3.2, Spring Data Hibernate H2, REST, Angular 1.5.3, Bootstrap, Maven.
Stars: ✭ 6 (-76%)
Mutual labels:  angularjs
Ng Gentelella
An AngularJS admin interface based on the Gentelella bootstrap template markup.
Stars: ✭ 24 (-4%)
Mutual labels:  angularjs
Rails Api And Angularjs
Integration between rails and angularjs which includes rspec tests.
Stars: ✭ 22 (-12%)
Mutual labels:  angularjs
Extremeresults Webapp
A web app for Extreme Results (XR). Built with AngularJS and related technologies.
Stars: ✭ 17 (-32%)
Mutual labels:  angularjs

ngFileReader

demo image

This is file reader component on angular.

LiveDemo

demo

Support

  • IE8+
  • chrome
  • firefox

Dependency

You need load jQuery and FileReader if browser is not support FileReader.

And The base64 size only limit 32kb if you use base64 to set image on IE8.

You also use other FileReader version,if you don't want to use fixed position by flash.

Install

bower install ngFileReader

or

npm install ngFileReader

Usage

Set some attrs of element.

<div ng-file-reader on-readed="onReaded( event, file )" read-method="readMethod"  multiple></div>

size:{{file.size | fileSize}}

<img ng-src="{{img}}">

Set a reader method.

$scope.readMethod = "readAsDataURL";

Add a on-readed callback to set file size and img data.

$scope.onReaded = function( e, file ){

  $scope.img = e.target.result;
  $scope.file = file;
};

You are able to follow this If you use browserfiy.

var app = angular.module('myApp', [require('ngFileReader')]);

Attribute

filereader

This is swf path, if you use ie8 ~ ie9.

multiple

Input multiple property.

debug-mode

Use swf only.

ex:

Set the attr on tag.

debug-mode="true"

accept

accept file extensions.

##Parameter

read-method

This is file reader method,when you selected file to call read-method method.

ex: readAsDataURLreadAsTextreadAsBinaryString

Set the attr.

read-method="readMethod"

Set a string value.

$scope.readMethod = "readAsDataURL"

Event

on-selected Event

It will trigger this event if you has selected.

on-readed Event

It will trigger this event When the selected file has readed by file reader.

Filter

fileSize

Transfer file size from number to unit.

<!-- 1048576 => 1 m -->
{{file.size | fileSize}}

You can write this if you need round off to the 2nd decimal place.

{{file.size | fileSize:2}}

Run

run a server:

grunt server

Finally,open your brower,enter http://localhost:3000/example/index.html.

Minification

Just run npm install to install dependencies. Then run grunt for minification.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].