Home

namespace
ml-results

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

angular element directive; displays search results.

Binds a link property to each result object, based on the result of the function passed to the link attribute. If no function is passed a default function is provided. The resulting link property will have the form /detail?uri={{ result.uri }}

attributes:

  • search: a reference to the search results object from MLSearchContext#search
  • link: optional. a function that accepts a result object, and returns a URL to be used as the link target in the search results display
  • click: optional. a function that accepts a result object. if present, will be used as the click-handler for each result (link will be ignored)
  • template: optional. A URL referencing a template to be used with the directive. If empty, the default bootstrap template will be used.

Example:

<ml-results results="ctrl.response.results" link="ctrl.linkTarget(result)"></ml-results>

Generated by JSDoc 3.3.3 on February 11, 2016.