gian-ngx-tiny-slider
Version:
Angular component that gives you possibility to use tiny-slider library.
26 lines (21 loc) • 520 B
text/typescript
import {ElementRef, Injectable} from '@angular/core';
import {tns} from 'gian-tiny-slider/src/tiny-slider';
({
providedIn: 'root'
})
export class GianNgxTinySliderService {
constructor() {
}
initSlider(config, elementRef: ElementRef) {
const extendConfig = Object.assign({container: elementRef.nativeElement}, config);
return tns(extendConfig);
}
getDefaultConfig() {
return {
items: 3,
mode: 'carousel',
controlsPosition: 'bottom',
speed: 400
};
}
}