Hello Deepak ,
Example :
This will be angular code :
var ergastAPI = {};
ergastAPI.getAllProjects = function () {
var reviewServicePath = 'Project/getAllProjects';
return $http({
method: 'POST',
url: reviewServicePath
});
}
this controllers .cs code :
[HttpPost]
public ActionResult getProjects()
{
QueryResult queryResult = new QueryResult();
SearchWebservice searchWebservice = new SearchWebservice();
queryResult =
searchWebservice.getProjects(Session["authenticationtoken"].ToString(), null,
false);
return Json(queryResult, JsonRequestBehavior.AllowGet);
}
On Monday, January 11, 2016 at 6:37:09 AM UTC+5:30, Deepak Pal wrote:
>
> Hello i am new to anguler world, from the rest call i am getting the data
> like below
>
>
> {
> "fileHistory": [
> {
> "totalTransferCount": "20",
> "successfulTransferCount": "9",
> "failedTransferCount": "0",
> "avgFileSize": "45970.90",
> "avgTimeTaken": "00:00:05.6",
> "avgTransferRate": "56.6184",
> "serialNumber": "1234567777",
> "model": "test",
> "filename": "test.zip"
> },
> {
> "totalTransferCount": "20",
> "successfulTransferCount": "9",
> "failedTransferCount": "0",
> "avgFileSize": "45970.90",
> "avgTimeTaken": "00:00:05.6",
> "avgTransferRate": "56.6184",
> "serialNumber": "34343343555",
> "model": "test1",
> "filename": "test1.zip"
> }
> ]
> }
>
> in my anguler service call i am using below code :-
>
> function(response){ $scope.fileTransferHistoryList=response.fileHistory;}
>
>
> but this code is not working nothing displayed on UI. Please help. In rest
> side there is a warpper class which has list of object .
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.