2017-02-27 53 views
0

我一直在試圖爲我的html表中的角度2實現表分頁,但它不適合我。我已經將腳本包含在我的angular-cli.json文件中。我不正確的做法是什麼?角度2中的表分頁

<script> 

      $(document).ready(function() { 
       $('#foodTable').DataTable(); 
      }); 


     </script> 

     <script src="../foodlist/js/pagination1.js"></script> 
     <script src="../foodlist/js/pagination2.js"></script> 
     <script src="../foodlist/js/pagination3.js"></script> 

<table class="table" id="foodTable" > 
</table> 
+0

你爲什麼在裏面使用jquery? – Aravind

+0

@Aravind我也必須爲它創建一個文件嗎? – XamarinDevil

+1

使用jQuery是不可取的,你有很多插件。有什麼要求是關於? – Aravind

回答