App Studio

Version 4.2
How To
Documentation
    Learn More

      search:tabs

      Description

      The Tabs Directive

      Usage

      as element:
      <search:tabs
             response="{object}"
             tabs="{string}"
             [field-name="{string}"]
             [all-label="{string}"]
             [platform="{string}"]
             [query="{string}"]
             [count-number="{string}"]>
      </search:tabs>

      Directive info

      • This directive creates new scope.

      Parameters

      ParamTypeDetails
      responseobject

      A response object

      tabsstring

      The tabs to output. Specified as a comma separated list. When using filter tabs, you can either specify the actual filter name, or the actual filter name with an alternative display name. To substitute actual filter names with alternative display names use the following notation: 'programme=Programmes'. . Multiple filters can be grouped under a single tab by separating the actual filter names with a |character, e.g.: 'Videos|Podcasts=Multimedia'.

      field-name
      (optional)
      string

      The field to apply filters to when in 'filter' mode.

      all-label
      (optional)
      string

      Label for the option to turn off all filters. If this attribute is specified, an additional link will be displayed to show all Results (e.g. not applying a Filter).

      platform
      (optional)
      string

      The Platform to use when submitting the facet without any filters applied. This is used to to get the filter counts for the original query after a user clicks on a filter (e.g. drills down).

      query
      (optional)
      string

      The name of the query object used to get the count values.

      count-number
      (optional)
      string

      Specify how the number representing the count should be formatted. Optional values are 'plain', 'formatted', 'rounded' and 'none'.

      Events

      • tab_changed

        When the tab is changed on this directive an event called tab_changed will be fired with the name of the tab that is now active.

        This event can be listened to like so.

        $scope.$on('tab_changed', function(e, tab){
             console.log('New Tab = ' + tab);
        });
        

        Type:

        broadcast

        Target:

        root scope

      Example

      Source

      
      
      
      
      
      

      Demo