На основе выбора флажка mat-tree, таблица фильтра в angular6

Возможно, вы сможете сделать это с помощью xpath. что-то вроде //tr[contains(@class, 'row') and position() mod 2 = 0] может работать. Существуют другие вопросы SO, расширяющие подробности о том, как более точно сопоставлять классы.

1
задан Brian Tompsett - 汤莱恩 15 January 2019 в 21:42
поделиться

1 ответ

<script>
    $(function() {

   $.getJSON('data.json', function(data) {
       $.each(data.data, function(i, f) {
          var tblRow = "<tr>" + "<td>" + f.reminderName+ "</td>" +
           "<td>" + f.status+ "</td>" 
           $(tblRow).appendTo("#jsondata tbody");
     });

   });
});
</script>

<div>
   <table id= "jsondata" border="2">
  <thead>
            <th>Reminder Name</th>
            <th>Status</th>
        </thead>
      <tbody>

       </tbody>
   </table>

</div>

ЗДЕСЬ !!! ПОЖАЛУЙСТА, КОММЕНТИРУЙТЕ НАЗАД, ЕСЛИ ОШИБКА

0
ответ дан Jay 15 January 2019 в 21:42
поделиться
Другие вопросы по тегам:

Похожие вопросы: