i have this code to get the xml data and convert it to json finally assign the json to the $scope object to be handled by the view
function employeesList($scope) {
$.get('http://www.benisuef.gov.eg/_vti_bin/owssvr.dll?Cmd=Display&List=%7B9E8B17D5-7AE8-4BC8-9068-105DA949734A%7D&XMLDATA=TRUE', function(xml) {
var json = $.xml2json(xml, true);
$scope.employeeList = json.data[0].row;
});
}
the problem is the angular controller doesn't wait until the get finish its work how can i make it wait for that ??!