How should I set loadingRecords string or HTML element for angular-datatables

不打扰是莪最后的温柔 提交于 2019-12-08 07:33:38

问题


In native Datatables I set the loadingRecords like this:

var language = {
    "loadingRecords": '<img src="~/img/datatable_loading_bar.gif" />'
}

When loading data, it will show datatable_loading_bar.gif

But in angular-datatables, How can I achieve that?


回答1:


Use the withLanguage() method. You are not obligated to pass an entire language struct, simply pass just what you need to change :

.withLanguage({
   loadingRecords: '<img src="~/img/datatable_loading_bar.gif" />'
})


来源:https://stackoverflow.com/questions/37226074/how-should-i-set-loadingrecords-string-or-html-element-for-angular-datatables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!