Angular InstantSearch results disappearing


I discovered InstantSearch after going through this tutorial:

I’m trying to customize the code so that a user can select a record from the results list. My problem is that as soon as I click outside of the search box my results disappear. How do I make an individual hit selectable?

Here is my code:


  <ais-instantsearch [config]="searchConfigEX">
      placeholder="Search Exercises"

    <ais-hits *ngIf="showResultsEX">
      <ng-template let-hits="hits">
        <div *ngFor="let hit of hits">
          <ais-highlight attribute="name" [hit]="hit"></ais-highlight>


  searchConfigEX = {
    indexName: 'ngFitnessLog_Exercises'

showResultsEX = false;

  searchChangedEX(query) {
    if (query.length) {
      this.showResultsEX = true;
    } else {
      this.showResultsEX = false;

@jw.croley Hi thanks for creating this subject, could you create a reusable example using our templates?

Here’s one for Angular InstantSearch: