How To
Documentation
    Learn More

      search:result-list

      Description

      The Result List directive.

      Accessing result index

      Within a search result you can access the index of the result by doing {{$parent.index}}. The index is zero-based so for result 1 the index will be 0.

      Usage

      as element:
      <search:result-list
             response="{object}"
             results="{array}"
             [infinite-scroll="{string}"]
             [query="{string}"]
             [platform="{string}"]
             [load-more="{boolean}"]>
      </search:result-list>

      Directive info

      • This directive creates new scope.

      Parameters

      ParamTypeDetails
      responseobject

      A response object (Use response or results not both)

      resultsarray

      A list of results (Use response or results not both)

      infinite-scroll
      (optional)
      string

      Whether infinite scrolling should be enabled (query and platform is required for this functionality to be enabled).


      Valid values:-
      • false

        Disables infinite scrolling.

        (default)
      • true

        Enables infinite-scrolling in window mode (see below).

      • window

        When the window is scrolled to the bottom of the result list new results will be loaded.

      • parent

        When the parent element is scrollable when this element is scrolled to the bottom new results will load.

      query
      (optional)
      string

      The name of the query object used for infinite scrolling or load more.

      platform
      (optional)
      string

      The name of the platform object used for infinite scrolling or load more.

      load-more
      (optional)
      boolean

      Whether to have a clickable link to load more results.

      Example

      Source

      
      
      
      
      
      

      Demo