Client side pagination not working in smart table

后端 未结 2 643
星月不相逢
星月不相逢 2021-01-01 07:15

So I got a Smart-table for witch I reload the entire data-set (I need it for a graph). but I don\'t want all data to get rendered at once (got too many). So in the document

相关标签:
2条回答
  • 2021-01-01 07:34

    The problem is that if you load your data asynchronously, which you likely do if I understand your description, you need to tell smart-table to watch the source collection so it can refresh whenever there is a change. For that you need to use the st-safe-src

    <table st-safe-src="objectDataArr[0]" st-table="whateverVarYouWantToUseInTheTemplate">
       <tr ng-repeat="item in whateverVarYouWantToUseInTheTemplate"></tr>
    </table>
    
    0 讨论(0)
  • 2021-01-01 07:42

    If you're cool like me, you may have forgotten to pass the dependency to your app

    angular.module('app', ['ngRoute', 'smart-table'])
    
    0 讨论(0)
提交回复
热议问题