0

I'm trying to create a select tag paging with the following code:

<select ng-change="params.page(page)" ng-model="page" ng-options="page.number as page.number for page in pages"></select>

But the result is this:

enter image description here

Further debugging by using the following code:

<select ng-change="params.page(page)" ng-model="page" ng-options="page.number as page.number group by page.type for page in pages"></select>

brings me to the conclusion that the previous and the next pages (located at pages.type) are also included in the pages array.

enter image description here

So my question is, how do can I fix this? Is there a way to create an alternative array of only the pages that are really only pages or a way to filter the pages array based on the given types?

4

1 に答える 1