jakubrohleder / angular-jsonapi

Simple and lightweight, yet powerful ORM for your frontend that seamlessly integrates with your JsonAPI server.
http://jakubrohleder.github.io/angular-jsonapi/
GNU General Public License v3.0
96 stars 34 forks source link

Promise Undefined :´( #45

Open max-SS opened 8 years ago

max-SS commented 8 years ago

Hey guys.

I'm having a problem with the next code:

resource.all(params).promise.then(resolve => {
    $log.info(resolve); // the result is undefined
});

This return me the message: 'undefined'. someone has idea why is this happening?

micchyboy commented 8 years ago

WHY IS ANYONE NOT ANSWERING THIS! I LOST MY JOB BECAUSE OF THIS ISSUE.

max-SS commented 8 years ago

this is a new library json api we are using in the company where I work, it is being developed by the CEO of the company, is still not quite finished, but what it does it does well. ;)

https://github.com/reyesoft/ts-angular-jsonapi

micchyboy commented 8 years ago

Since the promise returns undefined, this is the approach I do to get data asynchronously

$scope.holdings = FundHoldings.get(clientId) $scope.holdings.promise.then(function(){ var holdingAttributes = $scope.holdings.data.attributes;

Do you think there is a better way?

bahek2462774 commented 7 years ago

ebala blyat' !!!! Hvatit eto terpet' !