2017-09-15 115 views
-1

無法讀取的未定義的屬性「長度」玉

table 
 
     tbody 
 
     tr 
 
      th ID 
 
      th Product Name 
 
      th Price 
 
      th Category 
 
      th Action 
 
     if data.length 
 
     each item in data 
 
      tr 
 
      td #{item['_id']} 
 
      td #{item['product_name']} 
 
      td #{item['price']} 
 
      td #{item['category']} 
 
      td 
 
      

對於這個代碼我收到提示無法讀取類型的財產「長度」未定義

for this code i m getting error**cant read property 'length' of type undefined**

回答

0

只需使用數據即可完成您現在所做的同樣的事情,測試數據是否爲空。

+0

謝謝你的幫助 –

相關問題