F
F
Friend2016-10-18 18:53:09
Django
Friend, 2016-10-18 18:53:09

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

2 answer(s)
A
Anton fon Faust, 2016-10-19
@bubandos

Here exactly the same task is considered: metanit.com/web/angular/3.2.php

F
Friend, 2016-10-19
@Tiran_94

Please delete this thread

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question