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


TypeScript PaginationUtil.parseAscending方法代碼示例

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


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

示例1: 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

示例2:

 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

示例3: 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


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