Search Lessons, Code Snippets, and Videos
search by algolia
X
#native_cta# #native_desc# Sponsored by #native_company#

Custom Algolia Hits Widget to Integrate With Angular Directives

written by Jeff Delaney
full courses and content on fireship.io

I recently posted a couple lessons about building a full text search feature with Algolia and InstantSearchJS. However, the main drawback is that you don’t have access to Angular’s core directives when using the widgets out of the box. Thankfully, there is a solution with InstantSearch Connectors. In this snippet, we build a custom hits widget that will save the results in a RxJS BehaviorSubject. From there, we can simply unwrap the results in the HTML template with the async pipe.

Gist