Query params - Passing only defined params


Hello guys, I’m wondering what’s the best approach for finding records in the backend with the query params passed in ember, I’m looking for the “right way” of passing params.

So, in MyController I have the query-params

queryParams: ['param1','param2','paramN'],
param1: undefined,
param2: undefined,
paramN: undefined,

I’m trying to do something like this:

this.store.find('pelicula',this.get('queryParams')).then(function (records) {
      self.set('model', records);

For example if I defined:


The URL of the transitionTo might be currentRoute?param1=10 (Not sending the undefined params)

I was thinking on a couple of solutions but I want to know if there’s a “right way” in Ember.