なぜng-repeatは結果を出力しませんか?なぜng-repeatは結果を出力しません
挿入オプションは機能していますが、出力はありません。 問題
<head>
<script>
var syntaxFinder = angular.module('syntaxFinder',[]);
syntaxFinder.controller('syntaxCtrl', function($scope, $http){
loaddata();
function loaddata(){
$http.get('https://sheetsu.com/apis/v1.0/471f7802').success(function(data){
$scope.autos = data.result;
$scope.refresh = function() {
loaddata();
};
});
}
});
syntaxFinder.controller('FormCtrl',function($scope,$http){
$scope.SendData = function() {
// use $.param jQuery function to serialize data from JSON
var data = $.param({
applicatie: $scope.applicatie,
locatie: $scope.locatie,
beschrijving: $scope.beschrijving,
code: $scope.code,
inhoud: $scope.inhoud,
});
var config = {
headers : {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
}
}
$http.post('https://sheetsu.com/apis/v1.0/471f7802', data, config)
.success(function (data, status, headers, config) {
$scope.PostDataResponse = data;
})
.error(function (data, status, header, config) {
$scope.ResponseDetails = "Data: " + data +
"<hr />status: " + status +
"<hr />headers: " + header +
"<hr />config: " + config;
});
};
});
</script>
</head>
<body ng-controller="syntaxCtrl">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>Syntax Finder</h2>
<div class="form-group">
<label>Zoek op Inhoud:
<input class="form-control" type="text" ng-model="search.inhoud" placeholder="Mysql register" />
</label><br/>
</div>
<table class="table table-striped">
<tr>
<th>Applicatie</th>
<th>Locatie</th>
<th>Beschrijving</th>
<th>Code</th>
<th>Inhoud</th>
</tr>
<!--<tr ng-repeat="auto in autos | filter:search:strict | limitTo:10 ">-->
<tr ng-repeat="auto in autos | filter:search:strict | orderBy:'applicatie' ">
<td>{{auto.applicatie}}</td>
<td>{{auto.locatie}}</td>
<td>{{auto.beschrijving}}</td>
<td>{{auto.code}}</td>
<td>{{auto.inhoud}}</td>
</tr>
</table>
<div class="form-group">
<button ng-click="refresh()">Refresh</button>
</div>
</div>
</div>
</div>
</body>
で更新する$ scope.autosにデータが移入されますか? – sebenalern
フィドルのリンクを更新しています –
はい、私はまだコードで何が間違っているのか理解できません – Dann