Searchstax ResultWidget Angular
The SearchstaxResultsWidget for Angular component displays the search results.
Usage
Import the component:
import { SearchstaxResultsWidget } from '@searchstax-inc/searchstudio-ux-angular';
Add it to the template:
<app-searchstax-results></app-searchstax-results>
Inputs
- afterLinkClick: Callback function triggered when a result link is clicked. Used to modify the clicked result.
 - noResultsTemplate: TemplateRef to override the default no results UI.
 - resultsTemplate: TemplateRef to override the default results UI.
 
Properties
- searchResults: Array of result objects.
 - metadata: Object containing search metadata like spelling suggestions etc.
 - searchTerm: The search term for which results are displayed.
 
Methods
- resultClicked(): Handles click on a result link. Calls afterLinkClick if defined.
 - isImage(): Checks if a field contains an image.
 
Template Binding Properties
The noResultsTemplate provides the following properties:
- metadata: Search metadata object.
 - searchTerm: Search term entered by user.
 
The resultsTemplate provides:
- searchResults: Array of result objects.
 - resultClicked: Method to handle result click.
 - isImage: Method to check for image.
 - context: Component instance context.
 
See Example of Results Widget for Angular
Questions?
Do not hesitate to contact the SearchStax Support Desk.