I want to use the ng-repeat directive to bind some data to a div. though the call is successful and i am getting the data and storing it in a scope variable im anot able to use the ng-repeat to display it
<div data-ng-app="myapp" id="sidestatus" style="position:fixed;top:50%;right:0;height:200px;width:200px;background-color:red;" data-ng-controller="myctrl">//wont bind here after successful execution
<ul>
<li data-ng-repeat="x in obj">
{{x.heading+' '+x.id+' '+x.name }}
</li>
</ul>
</div>
my javascript
var app = angular.module("myapp", []);
app.controller("myctrl", function ($scope, $http) {
var obj2=new Array();
$.ajax({
type: "POST",
url: "NotifierService.asmx/getdata",
data: {},
contentType: "application/json; charset=utf-8",
dataType: "json",
success:function (response) {
var res = response.d;
var res4 = res.split(",");
for (var i = 0; i < res4.length; i++) {
var res2 = res4[i].split(":");
obj2[i] = {}
obj2[i].heading = res2[0];
var res3 = res2[1].split("/");
obj2[i].id = res3[0];
obj2[i].name = res3[1];
}
$scope.obj = obj2;
//successfully execute the success function everytime
},
error:function () { alert("failure");}
});
});
data being sent
"heading1:23/name1,heading2:24/name2"