未捕获的类型错误:无法读取未定义的属性'mData'。

时间:2022-08-24 13:55:39

Im unable to post question . Please see attached screen shot for error.

我无法提出问题。请见附件截图错误。

未捕获的类型错误:无法读取未定义的属性'mData'。

<table>
  <tr ng-repeat="num in numbers">
    <td> {{num.number}} </td>
    <td> {{num.short_description}} </td>
    <td> {{num.category}} </td>
    <td> {{num.subcategory}} </td>
    <td> {{num.priority}} </td>
    <td> {{num.urgency}} </td>
  </tr>
</table>

1 个解决方案

#1


1  

Datatable requires table HTML in proper format, using <thead> and <tbody> Also number of <th> and number of <td> in all row should match. (but colspan can be used in headers) Try this HTML -

Datatable需要使用正确格式的表HTML,使用和也有< >和在所有行的数量应该匹配。(但是colspan可以在header中使用)尝试这个HTML -。

<table class="table table-striped" id="my_incidents_details" border="1">
        <thead>
                <tr>
                         <th>Number</th>
                         <th>Short Description</th>
                         <th>Category</th>
                         <th>Sub Category</th>
                         <th>Priority</th>
                         <th>Urgency</th>
                </tr>
        </thead>
        <tbody>                     
          <tr ng-repeat="num in numbers">

                 <td>  {{num.number}} </td> 
                 <td>{{num.short_description}}</td>
                 <td>  {{num.category}} </td> 
                 <td>  {{num.subcategory}} </td> 
                 <td>  {{num.priority}} </td> 
                 <td>  {{num.urgency}} </td> 

                                             </tr>
            </tbody>                                 
</table>

#1


1  

Datatable requires table HTML in proper format, using <thead> and <tbody> Also number of <th> and number of <td> in all row should match. (but colspan can be used in headers) Try this HTML -

Datatable需要使用正确格式的表HTML,使用和也有< >和在所有行的数量应该匹配。(但是colspan可以在header中使用)尝试这个HTML -。

<table class="table table-striped" id="my_incidents_details" border="1">
        <thead>
                <tr>
                         <th>Number</th>
                         <th>Short Description</th>
                         <th>Category</th>
                         <th>Sub Category</th>
                         <th>Priority</th>
                         <th>Urgency</th>
                </tr>
        </thead>
        <tbody>                     
          <tr ng-repeat="num in numbers">

                 <td>  {{num.number}} </td> 
                 <td>{{num.short_description}}</td>
                 <td>  {{num.category}} </td> 
                 <td>  {{num.subcategory}} </td> 
                 <td>  {{num.priority}} </td> 
                 <td>  {{num.urgency}} </td> 

                                             </tr>
            </tbody>                                 
</table>