當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ng-jhipster.PaginationUtil類代碼示例

本文整理匯總了TypeScript中ng-jhipster.PaginationUtil的典型用法代碼示例。如果您正苦於以下問題:TypeScript PaginationUtil類的具體用法?TypeScript PaginationUtil怎麽用?TypeScript PaginationUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PaginationUtil類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

 resolveFn: (paginationUtil: PaginationUtil, trans: Transition) => {
     const stateParams = trans.params();
     return {
         page: paginationUtil.parsePage(stateParams['page']),
         sort: stateParams['sort'],
         predicate: paginationUtil.parsePredicate(stateParams['sort']),
         ascending: paginationUtil.parseAscending(stateParams['sort'])
     };
 }
開發者ID:JimSpriggs,項目名稱:sourdough,代碼行數:9,代碼來源:user-management.state.ts

示例2: constructor

 constructor(
     private userService: UserService,
     private parseLinks: ParseLinks,
     private alertService: AlertService,
     private principal: Principal,
     private $state: StateService,
     private eventManager: EventManager,
     private paginationUtil: PaginationUtil,
     private paginationConfig: PaginationConfig
 ) {
     this.itemsPerPage = ITEMS_PER_PAGE;
     this.page = paginationUtil.parsePage($state.params['page']);
     this.previousPage = this.page;
     this.reverse = paginationUtil.parseAscending($state.params['sort']);
     this.predicate = 'id';
 }
開發者ID:JimSpriggs,項目名稱:sourdough,代碼行數:16,代碼來源:user-management.component.ts

示例3: resolve

 resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
     const page = route.queryParams['page'] ? route.queryParams['page'] : '1';
     const sort = route.queryParams['sort'] ? route.queryParams['sort'] : 'id,asc';
     return {
         page: this.paginationUtil.parsePage(page),
         predicate: this.paginationUtil.parsePredicate(sort),
         ascending: this.paginationUtil.parseAscending(sort)
   };
 }
開發者ID:chenshao0594,項目名稱:eshop,代碼行數:9,代碼來源:book.route.ts


注:本文中的ng-jhipster.PaginationUtil類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。