I am trying to download pdf file that send from server and byte stream. I am using angularjs. How we can achieved using $http.
In service js:
this.downloadGuestPDF = function (eId, sBy, tTypeIds, bcode) {
var response = $http({
method: "get",
datatype: "data.json",
url: "/Download/GuestList",
params: {
EventId: eId,
sortBy: sBy,
ticketTypeIds: tTypeIds,
barcode: bcode,
format: 'pdf'
}
});
return response;
};
In Controller js:
var tmp = guestlistService.downloadGuestPDF(eventId, orderBy, '1', includeBarcode).then(function (response) {
$scope.TicketTypes = response.data;
});
Views:
9379
Total Answered:
1
Total Marked As Answer:
0
Posted On:
22-Dec-2016 02:06