diff --git a/src/odometer/odometer.component.ts b/src/odometer/odometer.component.ts index 1cc9637..0f5c98c 100644 --- a/src/odometer/odometer.component.ts +++ b/src/odometer/odometer.component.ts @@ -62,6 +62,7 @@ export class Ng2OdometerComponent implements OnInit, OnDestroy, OnChanges, After @Input() theme: string = undefined; @Input() value: number = undefined; @Input() duration: number = undefined; + @Input() auto: boolean = undefined; private subscription: Subscription; private odometer: OdometerModel; @@ -124,6 +125,11 @@ export class Ng2OdometerComponent implements OnInit, OnDestroy, OnChanges, After this.config.duration = this.duration; } + // Auto + if (!_.isUndefined(this.auto)) { + this.config.auto = this.auto; + } + // Validate theme. If not part of the // available themes array, use the default if (!_.includes(this.themes, this.config.theme)) {