Skip to content

Instantly share code, notes, and snippets.

@gotoweb
Created January 21, 2015 06:49
Show Gist options
  • Save gotoweb/42c18eb8a7f563c5b601 to your computer and use it in GitHub Desktop.
Save gotoweb/42c18eb8a7f563c5b601 to your computer and use it in GitHub Desktop.

다음과 같이 field order option 추가하고, 쿼리 스트링을 넘겨서 정렬할 수 있게 만듦

정렬 비활성화 (이전 버전에서 이와 같이 작동)

<table-view-with-pager
	ng-model="dataResult"
	ng-total-count="numTotalCount"
	ng-items-per-page="numPageSize"
	ng-page-size="numPagerPageSize"
	on-page-change="changePage($idx)"
	field-order="{ enable: false, by: 'query', query: queryString }">
</table-view-with-pager>

image

정렬 활성화

<table-view-with-pager
	ng-model="dataResult"
	ng-total-count="numTotalCount"
	ng-items-per-page="numPageSize"
	ng-page-size="numPagerPageSize"
	on-page-change="changePage($idx)"
	field-order="{ enable: true, by: 'query', query: queryString }">
</table-view-with-pager>

image

필드 정렬 알고리즘은 '쿼리' 프로그램에서 사용하는 것과 동일

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment