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
responseobjectA response object
tabsstringThe 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 acharacter, e.g.: ‘VideosPodcasts=Multimedia’.
field-name (optional)stringThe field to apply filters to when in ‘filter’ mode.
all-label (optional)stringLabel 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)stringThe 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)stringThe name of the query object used to get the count values.
count-number (optional)stringSpecify 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