Thank you so much for your reply @bjrmatos
P
Purushoth11
@Purushoth11
0
Reputation
5
Posts
1290
Profile views
0
Followers
0
Following
Posts made by Purushoth11
-
RE: How to display jsreport response into browser using angularjs?
-
How to display jsreport response into browser using angularjs?
I'm trying to integrate jsreport with angularjs project. I can post jsreport json data but don't know to display that response into browser .Anyone tell me how to render jsreport from the response .Below is my angularjs controller code.
.controller('View1Ctrl', [ '$scope', '$http',function($scope, $http) { var onSuccess = function (data, status, headers, config) { $scope.data = data; }; var onError = function (data, status, headers, config) { $scope.error = status; } var datajson = { template:{'shortid':'S1Auk01mb'}, } var postReq = { method: 'POST', url: 'http://localhost:8005/api/report', data:datajson }; $http(postReq).success(onSuccess).error(onError); var getReq = { method: 'GET', url: 'http://localhost:8005/studio/templates/S1Auk01mb' }; $http(getReq).success(onSuccess).error(onError); $http(getReq) .then(response => { console.log(response.data); }) .catch(errorpayload => { console.log(errorpayload.data); }); }]);
Html code:
<div ng-controller="View1Ctrl"> Response: {{data}} <br/> Error: {{error}} </div>
-
RE: How to integrate jsreport with angularjs seed project?
Okay. I understand thank you for replying
-
How to integrate jsreport with angularjs seed project?
I just wanted to integrate jsreport with angularjs seed project but I don't know
how to use rest api to get response from the jsreport ?