InstantSearch / Angular / V4 / API reference

Ais-Range-Input | Angular InstantSearch V4 (Deprecated)

Deprecated content
Angular InstantSearch is deprecated. Please use InstantSearch.js instead. For more information, see Migrating from Angular InstantSearch.

Signature

Signature
<ais-range-input
  attribute="string"

  // Optional parameters
  [min]="number"
  [max]="number"
  [precision]="number"
  currency="string"
  separator="string"
  submitLabel="string"
></ais-range-input>

Import

1
2
3
4
5
6
7
8
import { NgAisRangeInputModule } from 'angular-instantsearch';

@NgModule({
  imports: [
    NgAisRangeInputModule,
  ],
})
export class AppModule {}

1. Follow additional steps in Optimize build size to ensure your code is correctly bundled.
2. This imports all the widgets, even the ones you don’t use. Read the Getting started guide for more information.

About this widget

The ais-range-input allows a user to select a numeric range using a minimum and maximum input.

Requirements

The attributes passed to the attributes prop must be declared as Attributes for faceting on the Algolia dashboard) or configured as attributesForFaceting with the Algolia API.

Examples

1
<ais-range-input attribute="price"></ais-range-input>

Props

attribute

Required
Type: string

The name of the attribute in the record.

1
<ais-range-input attribute="price"></ais-range-input>

min

Optional
Type: number

The minimum value for the input. When not provided, the minimum value is automatically computed by Algolia from the data in the index.

1
2
3
4
<ais-range-input
  // ...
  [min]="10"
></ais-range-input>

max

Optional
Type: number

The maximum value for the input. When not provided, the maximum value is automatically computed by Algolia from the data in the index.

1
2
3
4
<ais-range-input
  // ...
  [max]="500"
></ais-range-input>

precision

Optional
Type: number

The number of digits after the decimal point to use.

1
2
3
4
<ais-range-input
  // ...
  [precision]="0"
></ais-range-input>

currency

Optional
Type: string

Label for the currency sign.

1
2
3
4
<ais-range-input
  // ...
  currency="€"
></ais-range-input>

separator

Optional
Type: string

Label for the separator between the inputs.

1
2
3
4
<ais-range-input
  // ...
  separator="→"
></ais-range-input>

submitLabel

Optional
Type: string

Label of the submit button.

1
2
3
4
<ais-range-input
  // ...
  submitLabel="Ok"
></ais-range-input>
Did you find this page helpful?