Created
November 7, 2017 10:10
-
-
Save serenaf/d255828e4ae8ba6353e4f1a45559e99a to your computer and use it in GitHub Desktop.
Updating model hooks
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
For routes active, ask, jobs, new, show | |
model () { | |
return this.get('store').query('item', | |
{ | |
page: 1, | |
filter: 'NAME_OF_ROUTE' | |
}); | |
} | |
NAME_OF_ROUTE can be 'active', 'ask', 'jobs', 'new', 'show' | |
For frontpage route | |
model () { | |
return this.get('store').query('item', { | |
page: 1 | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment