how to create a nggrid custom footer

前端 未结 3 1714
自闭症患者
自闭症患者 2021-02-05 17:40

I want to enable footers for ng-grid but I want to completely customize it and override what ng-grid does by default.

Basically, I just want a \'Load more...\' link at a

3条回答
  •  抹茶落季
    2021-02-05 18:12

    Although it is not listed in the API section of the ng-grid website, you can define a custom $scope.gridOptions.footerTemplate. Take a look a the source code and you will find (it is undefined, so it falls back to the default template as shown below):

     // the template for the column menu and filter, including the button.
     footerTemplate: undefined,
    

    And here is the default template:

    {{i18n.ngTotalItemsLabel}} {{maxRows()}}({{i18n.ngShowingItemsLabel}} {{totalFilteredItemsLength()}})
    {{i18n.ngSelectedItemsLabel}} {{selectedItems.length}}
    {{i18n.ngPageSizeLabel}}

提交回复
热议问题