-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (44 loc) · 1.33 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
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="dyf" ng-submit="submit()">
<form name="userFormOne" novalidate>
<table>
<tr class="form-group" ng-repeat="x in names">
<td><label>{{ x.Field }}</label>
</td><td><input type="text" class="form-control" placeholder="{{x.Comment}}" required>
</td>
</tr>
</table>{{data}}
</form>
<button ng-click="Submitt()">Submit</button>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('dyf', function($scope, $http) {
$http.get(" https://cryptic-meadow-84775.herokuapp.com/gu")
.then(function (response) {$scope.names = response.data;console.log(response.data);});
$scope.items = [];
/*var urlp = "http://sc.productrx.com/public/survey/"+getDate();
$scope.Submitt = function() {
var req = {
method: 'POST',
url: urlp,
data: { items }
}
$http(req).then(function(response){});
};*/
});
/*function getDate() {
var d = new Date(),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();
if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;
return [year, day, month].join('-');
};*/
</script>
</body>
</html>