Home

namespace
ml-facets

Source: directives/ml-facets.directive.js:4

angular element directive; displays facets.

attributes:

  • facets: the facets property of a search results object from MLSearchContext#search. (ctrl.response.facets on MLSearchController)
  • toggle: A function to select/clear facets. Should invoke mlSearch.toggleFacet(facetName, value).search(). (MLSearchController#toggleFacet)
  • negate: optional. A function to negate/clear facets. Should invoke mlSearch.toggleNegatedFacet(facetName, value).search(). (MLSearchController#toggleNegatedFacet)
  • showMore: optional. A function get the next n (default 5) facets values. Should invoke mlSearch.showMoreFacets(facet, facetName). (MLSearchController#showMoreFacets)
  • template: optional. A URL referencing a template to be used with the directive. If empty, the default bootstrap template will be used (chiclet-style facets). If "inline", a bootstrap/font-awesome template will be used (inline facet selections)
  • truncate: optional. The length at which to truncate the facet display. Defaults to 20.

Example:

<ml-facets facets="ctrl.response.facets" toggle="ctrl.toggleFacet(facet, value)" show-more="ctrl.showMoreFacets(facet, facetName)"></ml-facets>

Generated by JSDoc 3.3.3 on February 11, 2016.