{"id":6901,"date":"2014-05-11T07:19:07","date_gmt":"2014-05-11T07:19:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/11\/uncaught-syntaxerror-unexpected-token-in-angularjs-collection-of-common-programming-errors-2\/"},"modified":"2014-05-11T07:19:07","modified_gmt":"2014-05-11T07:19:07","slug":"uncaught-syntaxerror-unexpected-token-in-angularjs-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/11\/uncaught-syntaxerror-unexpected-token-in-angularjs-collection-of-common-programming-errors-2\/","title":{"rendered":"Uncaught SyntaxError: Unexpected token : in AngularJS-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve been working on this for a few hours and can&#8217;t seem to get anywhere. I hope this is the right place to post this. I&#8217;m new to StackOverflow so please guide me to the right place if this isn&#8217;t correct.<\/p>\n<p>I have the following html file:<\/p>\n<pre><code>\n\n \n    \n    \n    \n    \n \n\n \n \n    <\/code><\/pre>\n<table class=\"table table-striped\">\n<tr ng-repeat=\"restaurant in dishclipsResult.results\">\n<td><\/td>\n<\/tr>\n<tr>\n<td>{{restaurant.name}}<\/td>\n<\/tr>\n<\/table>\n<p>And the following in my dishclips.js:<\/p>\n<pre><code>angular.module('DishClips', ['ngResource']);\n\nfunction DishClipsCtrl($scope, $resource) {\n    $scope.dishclips = $resource('http:\/\/apiv2.dishclips.com\/dishclips\/api\/:action',\n    {action:'searchRestaurants',address:'irvine',callback:'JSON_CALLBACK' },\n    {get:{method:'JSONP'}});\n\n    $scope.dishclipsResult = $scope.dishclips.get(); \n}\n<\/code><\/pre>\n<p>When I run this (in chrome) I get:<\/p>\n<p>Uncaught SyntaxError: Unexpected token :<\/p>\n<p>The json return looks great so I don&#8217;t understand why this is an issue.<\/p>\n<p>Thanks<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working on this for a few hours and can&#8217;t seem to get anywhere. I hope this is the right place to post this. I&#8217;m new to StackOverflow so please guide me to the right place if this isn&#8217;t correct. I have the following html file: {{restaurant.name}} And the following in my dishclips.js: angular.module(&#8216;DishClips&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6901","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6901"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6901\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}