jakubrohleder / angular-jsonapi

Simple and lightweight, yet powerful ORM for your frontend that seamlessly integrates with your JsonAPI server.

Home Page:http://jakubrohleder.github.io/angular-jsonapi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Promise Undefined :´(

max-SS opened this issue · comments

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?

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

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

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?

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