troubleshooting Question

What am I doing wrong with this Angular "get" example?

Avatar of Bruce Gust
Bruce GustFlag for United States of America asked on
5 Comments1 Solution593 ViewsLast Modified:
I'm going through the W3 course on Angular and I'm working through this example:

Here's my "term_list_json.php" code:


header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");


$new_list= new TermAdmin;


foreach($term_display as $term)
	if($output !="") 
		{$output.= ", ";}
	$output.= '{"disicpline": "' . stripslashes($term['discipline']) .'", ';
	$output.= '"term": "' .stripslashes($term['term']) .'", ';
	$output.='"definition"; "'. stripslashes($term['definition']).'"}';
$output = '{"records": ['.$output.']}';

echo $output;


You can see it live at

Now, here's my code on the Angular side:

<!DOCTYPE html>
<html lang="en">
<title>Angular Tutorial</title>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<script src=""></script>
table, th , td {
  border: 1px solid grey;
  border-collapse: collapse;
  padding: 5px;
table tr:nth-child(odd) {
  background-color: #f1f1f1;
table tr:nth-child(even) {
  background-color: #ffffff;
<body style="white-space: normal;">

<div ng-app="myApp" ng-controller="myCtrl">

	<tr ng-repeat="x in terms">


var app=angular.module("myApp", []);
app.controller('myCtrl', function($scope, $http) {
	.then(function (response) {$scope.terms =});

<p>With the "ng-options" directive, the selected value can be an object...</p>


When you run the page at, you get a blank screen, save some text. But there's a huge error that I've got pictured below.

Now sure what I'm doing wrong or how to process that error.

What do I need to change?

Jim Riddles
Prepress/OMS Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros