Last active
July 2, 2019 06:35
-
-
Save tleperou/4f369a2585f200e16c89e349c81bfedb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Route from '@ember/routing/route'; | |
import { action } from '@ember/object'; | |
import { inject as service } from '@ember/service'; | |
import { queryParam } from 'ember-query-params-service'; | |
export default class ApplicationRoute extends Route { | |
@queryParam search; | |
@queryParam limit; | |
@queryParam skip; | |
@service store | |
model() { | |
const { search, limit, skip } = this | |
return this.store.query('article', { search, limit, skip }) | |
} | |
@action | |
activate() { | |
// handle transition in the route | |
} | |
@action | |
deactivate() { | |
// handle transition out the route | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment