How To
Documentation
    Learn More

      url:tabs

      Description

      The Url Tabs Directive by clicking on a tab will not add the filter to the URL it will redirect the user to '/action/tab_value' if the action attribute is present on the tag. If not it will just redirect to '/tab_value'.

      Usage

      as element:
      <url:tabs
             response="{object}"
             tabs="{string}"
             [field-name="{string}"]
             [all-label="{string}"]
             [platform="{string}"]
             [query="{string}"]
             [count-number="{string}"]
             [action="{string}"]>
      </url: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'.

      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' and 'rounded'.

      action
      (optional)
      string

      Url to redirect.

      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