Working on creating an image slider in AngularJS with Google Material, I have encountered a couple of issues.
- Unable to bind keypress events
- The images slide both ways at the same time and then first one disappears after a few seconds
Some code is provided below:
$scope.onKeyUp = function (keyCode) {
console.log("I am here;")
if (keyCode === LEFT_ARROW) {
$scope.prevSlide;
} else if (keyCode === RIGHT_ARROW) {
$scope.nextSlide;
}
}
Link to full codepen: https://codepen.io/milindsaraswala/pen/yJaYpe
Seeking assistance on resolving these issues. Any help would be appreciated.