Skip to content
Advertisement

$http.get failing to retrieve data from PHP backend

AngularJS, PHP, and MySQL: changing ng-repeat data on ng-change

I’ven been working on a web-base system and ng-repeat seems to have error on duplicate keys and I don’t know what to do. The selectall brand seems working fine but the php code I paste below seems doesn’t work and the “track by $index”. the code below only display infinite loop or rows in the table

html code

JavaScript

angularjs code

JavaScript

php code

JavaScript

Advertisement

Answer

One of the $http.get operations is malformed.

ERRONEOUS

JavaScript

The second argument of the $http.get method does not carry data, it carries the optional config object.

From the Docs:

$http.get(url, [config]);

  • url string Absolute or relative URL of the resource that is being requested
  • config (optional) Object Optional configuration object. See $http() arguments

AngularJS $http Service API Reference – $http.get

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement