Resource handler used for loading Model resources.

Hierarchy (view full)

Properties

Accessors

Methods

Properties

_app: AppBase

The running app instance.

handlerType: string = ''

Type of the resource the handler handles.

Accessors

Methods

  • Add a parser that converts raw data into a Model. Default parser is for JSON models.

    Parameters

    • parser: object

      See JsonModelParser for example.

    • decider: AddParserCallback

      Function that decides on which parser to use. Function should take (url, data) arguments and return true if this parser should be used to parse the data into a Model. The first parser to return true is used.

    Returns void