Get a list from REST API


#1

Hello there.

I’m sorry if this is a very noobish question, but I’m having a hard to grasping the basic concepts of getting this done. If you could help me or simply point me in the right direction of what to do - I’d be very grateful.

I’m trying to get some data from an external API from my own website to display, and I’m having quite a lot of trouble doing so.

How would I go by displaying all this data in a list / table.

Sincerely yours,
Malmoc


#2

Simplest way to do it is by using $http service of angular:

var url = 'http://aktiespillet.co/api/v1/stocks'; 
    $http.get(url).success(function(data) {
    $scope.tableData = data;
    console.log(data);
  }).error(function(error) {
    console.log(error);
  });