ERROR:
SyntaxError: Unexpected token ' at Object.parse (native) at fromJson (http://localhost:58293/Scripts/angular-1.2.6/angular.js:1035:14) at $HttpProvider.defaults.defaults.transformResponse (http://localhost:58293/Scripts/angular-1.2.6/angular.js:6926:18) at http://localhost:58293/Scripts/angular-1.2.6/angular.js:6901:12 at Array.forEach (native) at forEach (http://localhost:58293/Scripts/angular-1.2.6/angular.js:302:11) at transformData (http://localhost:58293/Scripts/angular-1.2.6/angular.js:6900:3) at transformResponse (http://localhost:58293/Scripts/angular-1.2.6/angular.js:7570:17) at wrappedCallback (http://localhost:58293/Scripts/angular-1.2.6/angular.js:10905:81) at http://localhost:58293/Scripts/angular-1.2.6/angular.js:10991:26
SOLUTION:
You must use double quotes instead of quotes in json file.
So,
Your json file looks like this:
[
{
'name': 'Murat',
'age': 33
}
]
But your json file should look like this:
[
{
"name": "Murat",
"age": 33
}
]
Comments