Last active
July 2, 2019 06:35
This file contains hidden or 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