-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
75 lines (52 loc) · 1.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<style ="text/css">
.center{margin-left:auto;
margin-right:auto;
top: 50%;
margin-top: 50%;
margin-bottom: 50%;
}
.buttonSize{
font-size:x-large
}
.text{
font-size:larger;
font-weight:bold
}
</style>
<title>Camera Test</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js" ></script>
<script src="cordova.js"></script>
<script src="uploadDirective.js"></script>
</head>
<body>
<script type="text/javascript">
//define module
var myApp = angular.module('myApp', ['myUploadDirective']);
//controller
myApp.controller('myCtrl', ['$scope',function($scope){
$scope.result=[];
$scope.callback = function(data){
$scope.result=data;
}
}]); //end controller
</script>
<div ng-controller = "myCtrl">
<input type="file" file-upload-url="YOUR POST URL" file-callback="callback" />
<table>
<tr>
<td>Number of Results: </td>
<td>{{result.length}}</td>
</tr>
<tr>
<td colspan="2">Results:</td>
</tr>
<tr>
<td colspan="2"><span >{{result}}</span></td>
</tr>
</table>
</div> <!--end controller-->
</body>
</html>