我在angular 6中使用此组复选框。 https://stackblitz.com/angular/nkmjydodvnp?file=app%2Ftree-checklist-example.ts
"data": [ { "reminderName": "Cook dinner", "status": "some value", }, { "reminderName": "Read the Material Design spec", "status": "some value1", } ]
我在表格中显示这些数据。
有人能帮我怎么做吗?
<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>
在这里如果有错误,请回复