Why are 2 queries in a row?

In the controller do only one request, and two (with the same data):
$http({
 url: 'api/players/players',
 method: 'GET'
}).success(function(data){
 $scope.players = data;
});


What's wrong? This code is more where is not running.
July 12th 19 at 16:54
1 answer
July 12th 19 at 16:56
Solution
Most likely the controller specified in $routeProvider and in the template.

app.js
$routeProvider.when('/', {
 templateUrl: 'partials/homepage.html',
 controller: 'MyController'
});

partials/homepage.html


MyController will be called twice.
Okay, I have so. Thanks, will check later and note solved. - Lafayette.Heathco commented on July 12th 19 at 16:59

Find more questions by tags Angular