Concepts / Building Search UI / Upgrade guides
May. 10, 2019

Upgrade Guides

You are reading the documentation for Angular InstantSearch v3, which is in beta. You can find the v2 documentation here.

Migration from v0 to v1

Angular 2 and 4 support drop

In order to support Angular CLI 6 we had to drop the support for older versions, the only supported versions are now: 5, 6 and 7. You can update your Angular 4 application pretty easily by following this guide: https://update.angular.io/.

If you are using Angular +6 you will need an extra step, polyfill process.env by adding in your src/polyfill.ts:

1
(window as any).process = {env: {}};

Widget prefix

The ng- prefix is considered reserved for core implementations into Angular so we dropped it. All the widgets are now only starting with ais-:

1
2
3
4
5
6
7
8
9
10
11
<ais-instantsearch [config]="{...}">
  <ais-hits>
    <ng-template let-hits="hits">
      <div *ngFor="let hit of hits">
        Hit {{hit.objectID}}:
        <ais-highlight attribute="name" [hit]="hit">
        </ais-highlight>
      </div>
    </ng-template>
  </ais-hits>
</ais-instantsearch>

Server-side rendering

  • The createSSRAlgoliaClient util has been renamed to createSSRSearchClient
  • You cannot use the new routing: true option on <ais-instantsearch> widget until resolution of preboot#82

Did you find this page helpful?