Answer the question
In order to leave comments, you need to log in
How to output information received in json in angular.js via foreach?
How to output information received in json in angular.js via foreach?
app.js://Код сверху
$scope.npq = $http.get('json/items.json');
//Код снизу
index.php:<table ng-repeat="item in npq.items">
<tr>
<td>
<h1>{{ item.name }}</h1>
</td>
</tr>
</table>
items.json:{
"items": [
{
"name": "M4A1-S | Hyper Beast",
"price": "7",
"quality": "Battle-Scared"
}
]
}
Outputs nothing. How to fix?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question