Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Martin Gontovnikas
    @mgonto
    Hey
    asdfasdf
    Adam Wynne
    @adamwynne
    hello?
    Eric Man
    @meric
    Hello
    Olivier PASCAL
    @pascaloliv
    Hello ! Pretty over-powered library ! Gg to contributors!
    Florian Goße
    @floriangosse
    How is the status of restangular 2.0 ?
    Dan Weaver
    @dan-weaver
    hey can anyone suggst how I could create a response interceptor that only works on one restangular element?
    Dan Weaver
    @dan-weaver
    is 1.x still being maintained?
    Ahmed Saleh
    @AhmedZaleh
    Hello
    has any one tried authenticating users using rails devise and Restangular POST method ?
    I always get Status code: 404 Not Found
    and the Request Method is being: OPTIONS
    Kent Cooper
    @kentcooper
    Are you posting across domains?
    Sounds like the browser is trying to make a CORS request and your server API is not responding
    Ahmed Saleh
    @AhmedZaleh
    ah yes, they are on different ports
    however, i'm setting the CORS headers on my server side api
    Ahmed Saleh
    @AhmedZaleh
    it was all about CORS policy, i used https://github.com/cyu/rack-cors to solve the problem
    Heitor Neiva
    @hneiva
    I can't upgrade from 1.2.1 because some of the API's I access return non-list responses on getList anyway I can disable this check on restangular configuration?
    Andrea Passaglia
    @gurghet
    Nice geometric form
    Andrew Boehner
    @Boehner
    "dependencies": {
        "lodash": ">=1.3.0",
        "angular": "~1.x"
      },
    Should this look for lodash breaking changes ? Had an issue today when lodash upgraded to 4.0.0
    This message was deleted
    Andrew Boehner
    @Boehner
    #1295 found the open issue
    Mathew Foscarini
    @thinkingmedia
    It's contains a reserved word now? Maybe it's in Object
    Heitor Neiva
    @hneiva
    @mgonto Are you planning on updating this project?
    vinaykumar12
    @vinaykumar12
    how to post object in body while saving data
    how to send object to server without queryparams
    Matt Shwery
    @mshwery

    I'm having trouble finding good documentation on how to create a restangular service for a singular nested resource? One that does not accept an id in the path.

    Example:

    /users/:user_id/trends

    There is no :trends_id, but the endpoint is not a collection. It returns a single json object as opposed to an array of json objects.

    trends may not be the best example, but the point is that the resource is a has_one relationship to the parent.
    Matt Shwery
    @mshwery
    @mgonto any recommendation on this ^
    Cesar Bretana Glez
    @bretanac93
    Hello everyone, I spend the last hour looking for some resources that help me work with restangular combined with some other stuffs, I'm newbie on this, so I need a thing or two
    anggiaj
    @anggiaj
    Hey
    Matt Shwery
    @mshwery
    @bretanac93 anything in particular you were looking for? could you elaborate on "I need a thing or two"?
    Daniel Spasojevic
    @dspasojevic
    Hi, is there a way to replay a request from an error handler that will use the full interceptor stack for any replies?
    chanzian
    @chanzian
    hi, guys may i ask is printing(print out data as voucher) possible in ng-admin? anyone can help answer?
    Fredrik Boström
    @bostrom
    Hi all! Just wondering if anyone knows whether this project is being maintained anymore? Seems to be quite a few PRs open (including one of mine), but no-one seems to consider merging them.
    Matt Erman
    @CodeLiftSleep
    Quick question...I was trying to set up Restangular to return all JSON data from this site: https://jsonplaceholder.typicode.com/posts but I couldn't get it working with Restangular.all---I tried many different configurations, using $object after the get() and without it, etc, but it kept returning empty. If I attempted to return data using Restangular.one('posts',52).get(); it worked fine and returned that piece of data. Could anyone let me know what I was doing wrong and how to get this to work?
    Fredrik Boström
    @bostrom

    @CodeLiftSleep try

    Restangular.all('posts').getList().then(function (response) {
        console.log(response);
    });

    Example here: http://codepen.io/anon/pen/wzLYoo?editors=1010

    Matt Erman
    @CodeLiftSleep
    I am using a global function to make a restangular call and return the data, but keep getting undefined...I am doing it this way so I can have error checking built in and not have to do it with every call...this call works fine: Restangular.one('Contract/Get').get().then(function (response) { $scope.gridOptions.data = response; })
    but when I do this: APICalls.Get($scope.gridOptions.data, "Contract/Get", "There was an error retrieving the contracts!") where args are (model, route, errorMsg), $scope.gridOptions.data is undefined. I believe it has to do with setting a deferred promise because its an Async operation, but when I set the promise, resolve it and then return it, it doesn't come back as undefined, but it doesn't come back as anything and the code never seems to run APICalls.Get($scope.gridOptions.data, "Contract/Get", "There was an error retrieving the contracts!").then(function (response) { $scope.gridOptions.data = response;}) any help here?
    Matt Erman
    @CodeLiftSleep
                  this.GetTest = function (model, route, errorMsg) {
                            var deferred = $q.defer();
                            Restangular.one(route).get().then(function (response) {
                                model = response;
                                deferred.resolve();
                            }), function (e) {
                                alertify.error("There was an error retrieving the contracts!"); //Message passed in when it errors
                                console.log('Error!! ' + e.name + ':  ' + e.message); //console logs name of error and message
                                deferred.reject();
                            };
                            deferred.promise;
                        };
    why is this not waiting for deferred to return?? It never runs the .then(function (response)) until after the code in the main program continues
    I'm calling this from a service
    Fredrik Boström
    @bostrom
    Restangular's async methods return promises themselves, so there's no need to create your own deferred objects. Just return whatever Restangular returns. Your code modified:
    this.GetTest = function(model, route, errorMsg) {
      // restangular returns a promise, pass that on directly
      return Restangular.one(route).get().then(function(response) {
        model = response;
        return response; // if you want to pass the response on to whoever called GetTest
      }),
      function(e) {
        alertify.error("There was an error retrieving the contracts!"); //Message passed in when it errors
        console.log('Error!! ' + e.name + ':  ' + e.message); //console logs name of error and message
      };
    };