# Ember cli pagination not changing the display content

**URL:** <https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176>\
**Category:** Ember CLI\
**Created:** [June 26, 2017, 1:59pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176 "2017-06-26T13:59:45Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [June 26, 2017, 1:59pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/1 "2017-06-26T13:59:45Z")

</div>

I am using ember cli pagination for local store in my ember app. i have successfully created pagination area with proper page number but the display content is not changing with the page number. here is my code—

in my hbs– {{#each pagedContent as |rule index|}} {{rule.Name}} {{/each}}  
{{page-numbers content=pagedContent}}

in controllers—\>

queryParams: [“page”, “perPage”], page: 1, perPage: 3, pagedContent: pagedArray(‘content’, { page: Ember.computed.alias(“parent.page”), perPage: Ember.computed.alias(“parent.perPage”), }), totalPages: Ember.computed.oneWay(“pagedContent.totalPages”),

how to change the display data?

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [June 26, 2017, 3:51pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/2 "2017-06-26T15:51:06Z")

</div>

It looks good to me. Does it only show the first page?

---

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [June 26, 2017, 4:00pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/3 "2017-06-26T16:00:17Z")

</div>

yes , for every page number it will show the first page.

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [June 26, 2017, 6:48pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/4 "2017-06-26T18:48:05Z")

</div>

I will try to find time to create an Ember App that works with your controller because I don’t see anything wrong with it.

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [June 26, 2017, 8:39pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/5 "2017-06-26T20:39:56Z")

</div>

Clone this:

[https://github.com/broerse/pagupdate](https://github.com/broerse/pagupdate)

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [June 27, 2017, 8:28am UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/6 "2017-06-27T08:28:49Z")

</div>

Also just created a Twiddle

> **[Ember Twiddle](https://ember-twiddle.com/#/c7952bcae2e7d9c413a02932b08b007f?openFiles=controllers.application.js%2C)**
>
> A web-based Ember.js code sharing tool that follows ember-cli's conventions.

---

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [June 30, 2017, 12:07pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/7 "2017-06-30T12:07:55Z")

</div>

i have done exactly the same thing but not working for me.

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [June 30, 2017, 2:45pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/8 "2017-06-30T14:45:09Z")

</div>

Yes I think there is something else wrong. Do you get console errors? Can you make a not working example on github or ember-twiddle?

---

<div class="post-metadata">

**Author:** ![nerdyworm](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nerdyworm/32/3860_2.png) [@nerdyworm](https://discuss.emberjs.com/u/nerdyworm)\
**Post date:** [June 30, 2017, 3:07pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/9 "2017-06-30T15:07:28Z")

</div>

What does your route look like?

---

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [July 1, 2017, 10:04am UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/10 "2017-07-01T10:04:05Z")

</div>

my router is like —

```
> export default Ember.Route.extend({
> model:function(){
> return this.store.findAll('rule'); 
> },
> });

```

---

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [July 1, 2017, 10:15am UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/11 "2017-07-01T10:15:37Z")

</div>

no i dont get console errors.

---

<div class="post-metadata">

**Author:** ![nerdyworm](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nerdyworm/32/3860_2.png) [@nerdyworm](https://discuss.emberjs.com/u/nerdyworm)\
**Post date:** [July 4, 2017, 4:36pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/12 "2017-07-04T16:36:59Z")

</div>

Looks like you need to add the queryParams config to the route

```auto
  queryParams: {
    page: { refreshModel: true },
  }

```

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [July 4, 2017, 5:42pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/13 "2017-07-04T17:42:28Z")

</div>

It should not be necessary. See the twiddle. But it could solve the problem for now. Thanks!

---

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [July 4, 2017, 6:47pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/14 "2017-07-04T18:47:01Z")

</div>

it did not solved my problem

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [July 4, 2017, 6:58pm UTC](https://discuss.emberjs.com/t/ember-cli-pagination-not-changing-the-display-content/13176/15 "2017-07-04T18:58:53Z")

</div>

Perhaps share the failing code. If you don’t have an extra filter on your controller I can’t explain this bug.
