Hi, I am working with an api with the angular service http and I get the api endpoint, url = api / v2 / {endpoint} but I can not go through the object that contains this url since to access each element I have to access a api / v2 / {endpoint} / 1 /, api / v2 / {endpoint} / 2 / ... and so on I would like to know if there is any method to get all the objects in this url to render them in html with ng -repeat because otherwise I can not access this resource.
var app = angular.module('miApp', []);
app.controller('myCtrl', function($scope, $http) {
$http.get("http://pokeapi.co/api/v2/")
.then(function(response) {
$scope.datos = response.data;
});
});
Thanks
Since the url is a general endpoint then I have to access each object pokeapi.co/api/v2/pokemon/1/ ... pokeapi.co/api/v2/pokemon/2 / ... pokeapi.co / api / v2 / pokemon / 3 / ... and so on. The answer I get from pokeapi.co/api/v2/pokemon/ is a list of objects that contains a property url and a name property I get in the property url = pokeapi.co/api/v2/pokemon/1 and in the property name = bulbasaur then I can only access these two objects but when I access the url directly pokeapi.co/api/v2/pokemon/1/ I can get all the objects of this object that are the ones I need to access but then I would like to know how I can go through all the objects of link and assign them to a data and then access them in html with ng-repeat = obj in data {{obj.name}} {{obj.description}} and so on thank you