Answer the question
In order to leave comments, you need to log in
How to upload data from json to html using AngularJS?
I use Django and AngularJS together. The problem is that if you enter json text into javascript, then everything works fine, json is unloaded as it should on the page, but if you specify a link to a json file, then loading in html does not occur, but the file itself is loaded, just with a delay.
How can this be implemented? So that json is loaded in html in time
$scope.ij= [
{
name: 'Блоха',
star: 'вторая',
type: 'Дерево',
price: 155,
img: "static/1.jpeg"
},
{
name: 'Битон',
star: 'вторая',
type: 'Дерево',
price: 1000,
img: "static/1.jpeg"
}
];
$http.get('arkabridgitopaderb').success (function(data) {
$scope.ij= data.records;
});
<div class="mybodydivright2" align="center" ng-repeat="i in ij| filtera:a:b | filterb:o:t | orderBy:p">
{% verbatim %}
{{i.name}}<br>
<img src={{door.img}} width="150" height="200"><br>
А: {{i.star}}<br>
Б: {{i.type}}<br>
С: {{i.price}}
{% endverbatim %}
</div>
Answer the question
In order to leave comments, you need to log in
Here exactly the same task is considered: metanit.com/web/angular/3.2.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question