How to populate table with json data with help of ajax and angularjs?

后端 未结 1 955
天命终不由人
天命终不由人 2021-01-29 11:06

I am developing flask app. I made one table which will populate with JSON data. For Front end I am using Angularjs and for back-end I am using flask. But I am not able to popula

相关标签:
1条回答
  • 2021-01-29 11:30

    If you are populating your data to items[],

     //declare an array of items. this will get populated with our ajax call
                        $scope.items = [];
    

    Then iterate it as ,

    <tbody>
        <!--repeat this table row for each item in items-->
        <tr ng-repeat="task in tasks.items">
            <td>{{task.description}}</td>
            <td>{{task.done}}</td>
            <td>{{task.title}}</td>
                    <td>{{task.uri}}</td>
        </tr>
    </tbody>
    
    0 讨论(0)
提交回复
热议问题