The invenio search results facets
- Source:
Example
Usage:
<invenio-search-facets
template='TEMPLATE_PATH'>
... Any children directives
</invenio-search-facets>
Methods
(static) link(scope, element, attrs, vm)
Handle the click on any facet
Parameters:
Name | Type | Description |
---|---|---|
scope |
service | The scope of this element. |
element |
service | Element that this direcive is assigned to. |
attrs |
service | Attribute of this element. |
vm |
invenioSearchController | Invenio search controller. |
- Source:
(static) templateUrl(element, attrs)
Choose template for facets
Parameters:
Name | Type | Description |
---|---|---|
element |
service | Element that this direcive is assigned to. |
attrs |
service | Attribute of this element. |
Example
Minimal template `template.html` usage
<div ng-repeat="(key, value) in vm.invenioSearchResults.aggregations track by $index">
<ul class="list-unstyled" ng-repeat="item in value.buckets">
<li>
<input type="checkbox"
ng-click="handleClick(key, item.key)" />
{{ item.key }} ({{ item.doc_count }})
</li>
</ul>
</div>