Answer the question
In order to leave comments, you need to log in
Why are there 2 requests in a row?
In the controller, I make only one request, but two occur (with the same data):
$http({
url: 'api/players/players',
method: 'GET'
}).success(function(data){
$scope.players = data;
});
Answer the question
In order to leave comments, you need to log in
Most likely, the controller is set both in $routeProvider and in the template.
$routeProvider.when('/', {
templateUrl: 'partials/homepage.html',
controller: 'MyController'
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question