Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Created August 18, 2014 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alexspeller/2ad65a3616d9a3d1bcf7 to your computer and use it in GitHub Desktop.
Save alexspeller/2ad65a3616d9a3d1bcf7 to your computer and use it in GitHub Desktop.
App.FilteredRoute = Em.Route.extend
page: 1
query: null
model: ->
@store.find('something', page: @page, query: @query)
actions:
nextPage: ->
@page += 1
@refresh()
previousPage: ->
@page -= 1
@refresh()
query: (string) ->
@query = string
@refresh()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment