0
にページに表示されないデータは最近、私のページが表示されたデータが、昨日から急にその今示します。私は私が間違って何をしたか混乱しています。私は適切にチェックし、すべてが正常に動作しています。ここ はUI-なぜ角度JS
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myApp">
<head runat="server">
<title></title>
<script src="Scripts/angular.js"></script>
<script src="Scripts/jquery-1.8.3.min.js"></script>
<script src="Scripts/angular-route.min.js"></script>
<script src="script.js"></script>
<script src="EmployeeServices.js"></script>
</head>
<body>
<form id="form1" ng-controller="EmpCtrl" ng-submit="save()">
<table border="1" style="text-align: center; margin-left: 410px;">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
<th>Gender</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="employee in employees">
<td>{{employee.Name}}</td>
<td ng-bind="employee.Age"></td>
<td ng-bind="employee.City"></td>
<td>{{employee.Gender && "Male" || "Female"}}</td>
<td><a href="#" ng-click="EditEmployee(employee.EmpId)">Edit</a> </td>
<td><a href="#" ng-click="DeleteEmployee(employee.EmpId)">Delete</a> </td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
Controller-
のコードvar app = angular.module('myApp', ['ngRoute']);
app.controller('EmpCtrl', function ($scope, $http, fetchEmpService) {
$http.get("EmpWebService.asmx/GetEmp")
.then(function (response) {
$scope.employees = response.data;
});
}
上のコードであり、Iはまたチェックし、コントローラは、オブジェクト形式でデータを受信しているが、その私はUI
あなたは、おそらく彼は、コントローラは、データを受信していることを言った応答 –
に同じ共有することができます。あなたが受け取っているデータを投稿してください。 –
から任意のデータを受信していないjsfiddle – Marko