Thiyagarajan Thiyagarajan - 3 years ago 151
AngularJS Question

Ng-bind is not working

I have a issue in data binding using angularjs

I am trying to bind the data from the controller view.
data has been successfully received in the response. i have assigned it in the datalist. while trying to loop the datalist using ng-repeat and ng-bind i cannot able to view.
seems ng-repeat is working i can able to see the index looping successfully.
Kindly help on this issue.


<tr ng-repeat="data in dataList">
<td ng-bind="data.Name"></td>
<td ng-bind="data.Email"></td>
<td ng-bind="data.Phone"></td>

Angular Js

var myApp = angular.module('myModule', []);
myApp.controller('myController', function ($scope, $http) {
$scope.dataList = [];
$http.get('/Home/JsonValue').then(function (response) {
if (response != null || response != "undefined") {
$scope.dataList = response;

Json Data

Data: Array(5)
0:{Name: "Pramod", Email: "", Phone: "987654321"}
1:{Name: "Prem", Email: "", Phone: "123456789"}
2:{Name: "Ram", Email: "", Phone: "9811234343"}
3:{Name: "Shyam", Email: "", Phone: "9889657454"}
4:{Name: "Jitesh", Email: "", Phone: "9535468899"}

Answer Source

You should access the data property of response

 $http.get('/Home/JsonValue').then(function (response) {
      if (response != null || response != "undefined") {
        $scope.dataList =;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download