javascript - angular gets data from the background and renders the table, "No data yet" when there is no data
阿神
阿神 2017-06-26 10:55:22
0
1
668
 var form = document.getElementById("table");
 form.find('tbody').append('<tr><td>暂无数据</td></tr>');

Always reporting error find is not a function
Yes, I have introduced jquery

阿神
阿神

闭关修行中......

reply all(1)
学习ing

Look at this document.getElementById("table"),
Here we use native js to get a dom element and then call the find method
and find is the method of the jQuery instance. So an error will be reported.
can be modified to the following code:

$('#table tbody').append('<tr><td>暂无数据</td></tr>');

Or use ng-if|ngIf to bind data in the view layer to display

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template