API Docs for: 0.25.0
Show:

PaginatedRouteMixin Class

Extends Ember.Mixin
Module: mixins
Parent Module: ember-osf

Route mixin to support fetching paginated results

Because this uses query parameters, it should be used in tandem with PaginatedControllerMixin

Item Index

Properties

Methods

apply

(
  • obj
)
private

Parameters:

Returns:

applied object

detect

(
  • obj
)
Boolean private

Parameters:

Returns:

queryForPage

(
  • modelName
  • routeParams
  • userParams
)
Promise

Fetch a route-specified page of results from an external API

To use this argument, pass the params from the model hook as the first argument.

model(routeParams) {
  return this.queryForPage('user', routeParams);
}

Parameters:

  • modelName Object

    The name of the model to query in the store

  • routeParams Object

    Parameters dictionary available to the model hook; must be passed in manually

  • userParams Object

    Additional user-specified query parameters to further customize the query

Returns:

reopen

(
  • arguments
)
private

Parameters:

Properties

pageParam

String

Allow configuration of the backend URL parameter used for page #

Default: "page"

perPageParam

String

Allow configuration of the backend URL parameter for number of results per page

Default: "page[size]"