Search Posts

Category: web-services

ui-router — data service called in view1 not showing in view2

Web service isn’t working correctly, not sure if that is the issue new to AngularJS and HTML in general and trying to figure out an additional issue to a previous question I had. What I am trying to do is to display the information from my web service onto the page I’ve created: $scope.clickFunc = function () { $scope.isNewSite = false; $scope.isModifySite = true; var siteId = Number($stateParams.siteId); SpringDataRestService.get( { “collection”: “sites”, “resource”: siteId }, […]

pass web service data to custom directive in angular js

I created one custom directive for multi-select in angular js and I’m passing data to multi-select directive as below: <multiselect select-items=”selectedCodes” data=”names” check-id=”id1″></multiselect> and scope in my js file is scope: { data : ‘=’, selectItems : ‘=’, checkId : ‘@’ }, Everything is workig fine as expected when i’m hard coding data and using that in my directive. but when i’m getting data from web service and using that variables in my directive null […]

REST API for a game

I am developing a web distributed application to let any user to play the Klondike (solitaire) game. I want to develop a API REST but I am not sure how the resources URL should look like. At the server, I have the ‘game’, ‘stock’, ‘waste’, ‘tableau’, ‘foundation’ classes among others. The game class has the method moveFromStockToWaste, moveFromTableauToTableu… which implements the movements of the game. What I have read about REST API is that the […]

Angularjs Jsonp Callback method is not triggering

I am working on angularjs services. I got some callback response from my API endpoint. I am using angular jsonP to fetch callback response I have used jsonpCallbackParam: ‘jsonpCallback’ to parse my callback response. But this jsonpCallback function is not triggered. I have attached my response below. projectInstance.jsonpCallback(“getActiveProduct”,{“totalRecords”:null,”projectSnapShot”:[{“projectId”:”333333″,”projectNumber”:”123456″,”projectStatus”:”Active”}]}) Here is my service code: getActiveProduct: function() { var deferred = $q.defer(); var url = “myserver/getproject.json” projectInstance={}; $http.jsonp(url, { jsonpCallbackParam: ‘jsonpCallback’, data: ” }).then(function(data) { deferred.resolve(; }, […]

Unable to call web-service from angularjs app

Unable to call post webservice from my application. following is the code. var postLogin = “”; var loginvalue = {“email”:”[email protected]”,”password”:”cbsjc6dw3bgjyfdgdKHGGDF=”}; var config = { headers: { ‘Content-Type’: ‘application/json’ } } $ ,loginvalue,config ).success( function(response) { alert(“response “+ response) $scope.defer.resolve(response); }).error(function(error){ alert(“dddddd” + JSON.stringify(error)); }) If i write this code then it is returning as 400 error but if i use the postman application of google then i am getting the response without any error. So […]

how to write services in angular js [on hold]

Home .NET General service for poll question in angular js mohan gowtham mohan gowtham 1.6k6250 service for poll question in angular js Mar 21 2018 12:56 AM Poll question in angular js How to write a service for simple poll question,for example Who will Be the Next P.M of India? 1)Modi 2)rahul After 30 Days this question have to be replaced with some other like,for example Which Party is better 1)congress 2)Bjp in such a […]

CRUD de Usuarios Ionic3 – Angular4 – SQLite con POST a WebService

A continuación les dejo un tutorial para realizar un CRUD de usuarios. Utilizando: Ionic3 Angular4 SQLite CRUD de Usuarios con SQLite, Ionic 3 y Angular 4 Validación de Formularios y Post en un WebService Antes de iniciar, verificar que tener las siguientes herramientas disponibles: – Node. Js_ – Ionic 3 (Framework)_ – Angular 4_ – Cordova_ – Visual Studio Code (Recomendado)_ – Dispositivo Movil con la App Ionic View para pruebas. Comandos básicos de Ionic […]

filtering in an ng-repeat from JSON response

I’ve got a question about filtering within a ng-repeat. But this isn’t a simple question since I’m not really having a problem that needs a solution. In this case, i’m looking for the best possible answer that doesn’t require a lot of code but still does the trick as to how I want it to. It will become more clear in my description. a short introduction: So I’m currently working on a shopping application. The […]

Select specific values from json_decode in php

I’ve stumbled on a problem that i think is a bit strange since i’ve followed other examples to the exact code but i still didn’t get the same result. Short summary I’m developing a shopping application and i’m using a session for the cart. Since i want to have the possibility to remove items from the cart i am using some levels inside the JSON object of the session. Cart summary The cart is created […]

Angular JS Application falied to load the data from Web Service

I am consuming web service into angular js application .In side the web service i am invocking a method to get the all the list of employees but i got following errors in Google chrome console windows and its not displaying the records .. angular.min.js:sourcemap:123 Error: transition superseded at $StateProvider.$get (angular-ui-router.js:2903) angular.min.js:sourcemap:123 Error: transition aborted at Object.invoke (angular.min.js:sourcemap:44) “Possibly unhandled rejection: {}” angular.min.js:123 Error: [$injector:unpr] $state.transition.resolved.then.$state.transition @ angular-ui-router.js:3352 angular.min.js:123 Error: [$injector:unpr]$injector/unpr?p0=%24routeProvider%20%3C- $state.transition.resolved.then.$state.transition @ angular-ui-router.js:3352 […]

Next Page »