I am trying to read json data from a url but it's not working.
This is how the json url look like (open it in firefox if chrome doesn't work).
And this is my javascript code:
$scope.displayA = function() {
$http.get('url').then(function(response){
$scope.ninjass = response.data;
});
};
I am trying to display it in a ng-repeat format, but nothing is showing.
the ng-repeat code
<table>
<!-- <th ng-repeat="ninja in ninjass">
{{ ninja.id }}
</th> -->
<tbody>
<tr ng-repeat="ninja in ninjass">
<td>{{ ninja.name }}</td>
<td>{{ ninja.description }}</td>
<!-- <td>
{{ ninja.NAME }}
</td>
<td>{{ ninja.NAME }}</td> -->
</tr>
</tbody>
</table>
The error log:
Uncaught SyntaxError: Unexpected token ]
And
Uncaught Error: [$injector:modulerr]