Ais-Range-Input | Angular InstantSearch V4 (Deprecated)
Signature
Import
Copy
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
string
The name of the attribute in the record.
1
<ais-range-input attribute="price"></ais-range-input>
min
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
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
number
The number of digits after the decimal point to use.
1
2
3
4
<ais-range-input
// ...
[precision]="0"
></ais-range-input>
currency
string
Label for the currency sign.
1
2
3
4
<ais-range-input
// ...
currency="€"
></ais-range-input>
separator
string
Label for the separator between the inputs.
1
2
3
4
<ais-range-input
// ...
separator="→"
></ais-range-input>
submitLabel
string
Label of the submit button.
1
2
3
4
<ais-range-input
// ...
submitLabel="Ok"
></ais-range-input>