Search Posts

Category: api

Website to create Diagrams [on hold]

I want to develop an online website to create diagrams ( Uml, use case , flow , ERD) e.t.c . I want to drag and drop objects such as box, rectange, lines, arrows. Can anyone please guide me what api or library should i use. If possible please send some relevant links so that i can get help. Thank you Source: AngularJS

value does not changed in angular.foreach loop when I am handling 404 response

My function is given below.. $scope.submitAction = function () { console.log(“permissions”); console.log($scope.permissionAuthorities); angular.forEach($scope.permissionAuthorities, function (result) { $scope.jasperReportPermission = {}; $scope.jasperReportPermission.jasperReport = jasperReport; $scope.jasperReportPermission.authorityName = result[0]; $scope.jasperReportPermission.status = true; $scope.duplicatePermission = {}; console.log(“report id”); console.log($scope.jasperReportPermission.jasperReport.id); console.log($scope.jasperReportPermission.authorityName); CheckDuplicateWithSameRoleAndReport.get({ reportId: $scope.jasperReportPermission.jasperReport.id, roleName: $scope.jasperReportPermission.authorityName }, function (result1) { $scope.duplicatePermission = result1; }, function (response) { if (response.status === 404) { console.log(“jrp auth”); console.log($scope.jasperReportPermission.authorityName); JasperReportPermission.save($scope.jasperReportPermission) } }); }) } when I call the submitAction function the console is shown looks […]

Can someone please point out what is wrong with my code

Update not working? I’ve been stuck on this problem, I’m very much new to the concept of API but working through some of the available articles I tried to create this update functionality but it fails to get updated all the time . It keeps printing Unable to print product. Can someone please point out what is wrong with my code. Thanks Sorry for the long post but I’ve been trying to figure the problem […]

Upload an Image to a Web Api using AngularJS

Hi I’m new with Web API’s and I’m working with AngularJS and Web API I’m trying to upload an image into a Web API but when I click the button to send the image it gives me an error I already did the method GET and it shows me all the images that are in that web API but it doesn’t work the method POST here is my code index.html <!DOCTYPE html> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> […]

angularjs 1 api routing error

I am using angular 1 for this project. and running into 405 (Method Not Allowed) error: my Api looks like this: [HttpPut] [Authorize] [Route(“api/License/Update”)] public bool Update(LicenseViewModel licenseViewModel) { } This is to update database with model of licenseViewModel But my routing went to: http://localhost/IRIS.Api6/api/License/Update?id=69499 awhich gives me error. 405 (Method Not Allowed) In My service, I have angular.module(‘portal.core.resources.license’) .factory(‘License’, [‘$resource’, ‘authSettings’, function ($resource, authSettings) { ‘use strict’; var License = $resource( authSettings.apiServiceBaseUri + ‘api/License/:id’, […]

Passing id to GET API url in Angular

I am trying to pass ID which I get from GET API to another GET API url which will be required in another state. I have response from a GET API [{ “ID” : 1, “Name”:”XYZ” }] I used Bootstrap cards in View , where I am generating above info in ng-repeat. On clicking in a particular card which will redirect to other state with the information of coming from another API by passing ID […]

Not able to load json file from server using get post angular

Hey I’m trying to use $http get function from angular to retrieve a json file from server located at “http://localhost/week10/resources/dog.json“ But I can’t seem to access the file. The code works fine when I use the file in the local destination. My code looks like this This is the angular file responsible for getting data app.controller(‘myCtrl’, function($scope, $http) { $http({ method : “GET”, url : “http://localhost/week10/resources/dog.json” }).then(function mySuccess(response) { $scope.dogObj = response.data; }, function myError(response) […]

Next Page »