import {coerceNumberProperty} from '@angular/cdk/coercion'; import {Component} from '@angular/core'; /** * @title Configurable slider */ @Component({ selector: 'slider-configurable-example', templateUrl: 'slider-configurable-example.html', styleUrls: ['slider-configurable-example.css'], }) export class SliderConfigurableExample { autoTicks = false; disabled = false; invert = false; max = 100; min = 0; showTicks = false; step = 1; thumbLabel = false; value = 0; vertical = false; get tickInterval(): number | 'auto' { return this.showTicks ? (this.autoTicks ? 'auto' : this._tickInterval) : 0; } set tickInterval(value) { this._tickInterval = coerceNumberProperty(value); } private _tickInterval = 1; }