Json Data
{
"TotalRecordCount": 50,
"Results": [
{
"TestId": 5002,
"TestName": "Test 01/05/2016"
}
]
}
My Service
function getTestSchedule() {
var deferred = $q.defer();
$http.get(TestAppConfig.TestApiRoot + "/Tests/gettestschedule/").then(function (response) {
deferred.resolve(response);
}, function (resp) {
deferred.reject(resp);
});
return deferred.promise;
};
My Controller Code
TestVm.test = TestModel.getTestSchedule;
So here controller is doing http call to web api, instead of http call how can I bind the page with the above json data