I do the application on angularjs, in passing studying the framework. Essence: in an application on 8 pages, a cross-domain request to the server occurs in this form $http.post('http://mysite/get_users.php?name='+$scope.name+'&nick='+$scope.nick).success(function(data){$scope.users=data;}); the problem is that during a quick transition between pages at some point records stop coming in from the server, although a minute ago I visited this page and saw a lot of records from the database (I look in the debugging panel on the Networks tab in the browser and see the server response "[] "). Who can explain what the problem is? Is it all about the angular or the server?

  • almost everything is true - the client or the server has nothing to do with it :-) angular. And what you do not want to pamper? put the logging - what requests from the client leave, most likely this is the case ... Or maybe on the server what is wrong, why he knows what has been written there - Eugene Bartosh
  • everything goes the same way from the client when data is successfully received and when "[]" is received. it means all the same server ... - Al Mr
  • how do you know that? according to your code judging to log you could not do it - Eugene Bartosh
  • Do not use the deprecated interface of the $http methods. Instead of .success(data => {}) use .then(response => {response.data}) - user236014
  • @EugeneBartosh the author of the question wrote how he knows it - Pavel Mayorov

0