namespaceml-metrics
Source: directives/
angular element directive; displays search metrics.
attributes:
search: a reference to the search results object from MLSearchContext#searchshowDuration: optional boolean. defaults totrue
Transcludes markup, and creates a new scope with the following properties:
total: The total number of search resultsstart: The index of the first displayed search resultpageLength: The length of the search results pagepageEnd: the index of the last displayed search resultmetrics: a reference to themetricsproperty of the search results object passed to thesearchattribute
Example:
<ml-metrics search="ctrl.response"></ml-metrics>
Transclusion Example:
<ml-metrics search="ctrl.response">
Showing {{ pageLength }} results in
<span ml-duration="metrics['total-time']">{{ duration.seconds | number:2 }}</span>
seconds.
</ml-metrics>