Smart-table - Setting page from code

拜拜、爱过 提交于 2019-11-28 11:26:38

To set the angular-smart-table page number from code use st-pagination's selectPage() function.

Where your HTML has a paginator element like this:

<div id="pagerId" st-pagination="" st-items-by- ...

You could use code like this in your directive

function setPage(pageNumber)
{
    angular
       .element( $('#pagerId') )
       .isolateScope()
       .selectPage(pageNumber);
}

You need to have jQuery installed to use $. I got the idea from the last example on: http://lorenzofox3.github.io/smart-table-website/

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