N
N
Nice_932017-06-06 18:40:30
JavaScript
Nice_93, 2017-06-06 18:40:30

Is it possible to manage QueryParams in Ember Component?

Can Ember Component manage QueryParams ? or only in Route and Controller.
I want to implement an independent pagination component, maybe you can add a couple of articles

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Romanov, 2017-06-07
@Nice_93

And what prevents the component from forwarding queryParam?

import Ember from 'ember';

export default Ember.Route.extend({
  queryParams: {
    page: {
      refreshModel: true
    }
  },

  model(params) {
    ...
  }
});

import Ember from 'ember';

export default Ember.Controller.extend({
  queryParams: ['page'],
  page: null
});

{{x-paginator page=page}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question