Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSlide conditionally is not working #123

Open
karthiknn opened this issue Jun 20, 2021 · 1 comment
Open

AutoSlide conditionally is not working #123

karthiknn opened this issue Jun 20, 2021 · 1 comment

Comments

@karthiknn
Copy link

import { Component, Input, OnInit, Output, ViewChild } from '@angular/core';
import { NgImageSliderComponent } from 'ng-image-slider';

@component({
selector: 'app-image-slider',
templateUrl: '
<ng-image-slider [images]="imagesObject" #nav [showArrow]="false" infinite="true"
[imageSize]="{width: '10%', height: 100}" imageClick="imageClick()">

', styleUrls: ['./image-slider.component.css'] }) export class ImageSliderComponent implements OnInit { @ViewChild('nav') slider: NgImageSliderComponent; @input() imagesObject: any[]; @output() slideMe: any;

constructor() { }

ngOnInit() {

}
//THIS WORKS
prevImageClick() {
this.slider.prev();
}
//THIS WORKS
nextImageClick() {
this.slider.next();
}
//This is for making the Slider run on the click of a button and I can't make it work
playClicked(){
this.slider.imageAutoSlide();
}
}

@karthiknn
Copy link
Author

@sanjayV FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant