J
J
Junior932017-04-18 13:04:08
API
Junior93, 2017-04-18 13:04:08

How to get data from rest via angular?

Hello, I'm trying to get data from api

order.getclient=function(id){
     return Restangular
       .all('/clients/'+id).customGETLIST(null, null);
   };

further in the controller I write
$scope.client = function() {
     Order.getclient($scope.order.id);
    };

Further I call it
test: {{client()}}
but there is a looping of requests.
Can you please tell me how to make a request and display the data?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2017-04-19
@Casufi

www.codelord.net/2016/11/23/spotting-outdated-angu...
https://docs.angularjs.org/api/ngResource/service/...
https://habrahabr.ru/post/190342 /
https://www.sitepoint.com/writing-angularjs-apps-u...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question