I\'m trying to create an image slider inside my Angular 5 component. The slider has Previous and Next controls which both work fine but I can\'t get it to slide automatically.>
change
setTimeout(this.autoslide, 2000)
to
setTimeout(this.autoslide.bind(this), 2000)
for this to keep pointing to the current class instance.
this