I'm pretty new to AngularJS. What I'm trying to do is to get data from a PHP file that will make requests on a DB and then will display them in a JSON format. For now I'm just testing to see if I can get the data from the PHP and is not working. It displays nothing. In console I get this message:
SyntaxError: Unexpected token {
at Object.parse (native)
at cc (http://localhost/SiteKardinal/includes/angular.min.js:14:360)
at Ud.e.defaults.transformResponse (http://localhost/SiteKardinal/includes/angular.min.js:69:261)
at http://localhost/SiteKardinal/includes/angular.min.js:69:22
at r (http://localhost/SiteKardinal/includes/angular.min.js:7:290)
at xc (http://localhost/SiteKardinal/includes/angular.min.js:69:4)
at b (http://localhost/SiteKardinal/includes/angular.min.js:70:238)
at F (http://localhost/SiteKardinal/includes/angular.min.js:100:187)
at http://localhost/SiteKardinal/includes/angular.min.js:101:350
at k.$eval (http://localhost/SiteKardinal/includes/angular.min.js:112:68) angular.min.js:92
GET http://localhost/SiteKardinal/includes/angular.min.js.map 404 (Not Found) angular.min.js.map:1
My code is this:
json_encodefor json encoding.. you forgot about commas..