-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
67 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bower_components/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
{ | ||
"name": "angular-file-directive", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"homepage": "https://github.com/vpegado/angular-file-directive", | ||
"authors": [ | ||
"Victor Pegado <[email protected]>" | ||
], | ||
"description": "Angular directive for parsing files", | ||
"main": "file.js", | ||
"main": "angular-file-directive.js", | ||
"ignore": [ | ||
"example/*" | ||
], | ||
"keywords": [ | ||
"angular", | ||
"file", | ||
|
@@ -15,6 +18,6 @@ | |
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"angular": ">=1.2.*" | ||
"angular": "1.2.*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
angular.module('fileApp', ['ngFile']) | ||
.controller('FileCtrl', ['$scope', function($scope){ | ||
// Example controller | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<html> | ||
<head> | ||
<title>Example</title> | ||
<script src="../bower_components/angular/angular.min.js"></script> | ||
<script src="../angular-file-directive.js"></script> | ||
<script src="app.js"></script> | ||
</head> | ||
<body ng-app="fileApp" ng-controller="FileCtrl"> | ||
<h1>Example</h1> | ||
|
||
<!-- Bind the values to $scope.files --> | ||
<input type="file" | ||
file="files" | ||
accept="image/*" | ||
multiple> | ||
|
||
<!-- Render the selected files directly in the view --> | ||
<div ng-repeat="file in files"> | ||
<h4>{{ file.name }}</h4> | ||
<img alt="{{ file.name }}" | ||
ng-src="data:{{ file.type }};base64,{{ file.body }}"> | ||
<pre>{{ file | json }}</pre> | ||
</div> | ||
|
||
|
||
</body> | ||
</html> |