<body ng-app="myAPP">
<div ng-controller="employeeCtrl">
<table style="border:1px solid gray">
<tr>
<th>Employee Name</th>
<th>Employee Address</th>
<th>Employee Salary</th>
</tr>
<tr ng-repeat="emp in employees">
<td>
{{emp.EmployeeName}}
</td>
<td>
{{emp.EmployeeAddress}}
</td>
<td>
{{emp.EmployeeSalary}}
</td>
</tr>
</table>
</div>
var myAPP = angular.module('myAPP', []);
myAPP.controller('employeeCtrl', function ($scope, $http) {
$scope.employees = "";
$http({
method: 'GET',
url: '/Employee/GetEmployee'
}).then(function (result) {
$scope.employees = result;
}, function (result) {
console.log(result);
});
});
using angular 1.6.6 version data binding is not working though it returns results from http get method.
employeeCtrlinside question.