I was wondering if anyone knew how to capture the ui-bootstrap carousel slide change event. The application I am writing gets all of its data from a DB and what I want to happen is when you select a new slide, a $http get requests gets fired off to get the newly selected slide's data from my DB. However I can't seem to find anything that tells me how to link into the carousel's change slide event. I have tried using $watch to watch the slides, but that hasn't worked.
Any suggestions?
Here is my $watch function I tried:
$scope.$watch(function () {
for (var i = 0; i < $scope.slides.length; i++) {
if ($scope.slides[i].active) {
return slides[i];
}
}
}, function (currentSlide, previousSlide) {
if (currentSlide !== previousSlide) {
$scope.getAllPanels(currentSlide.Id + 1);
}
});
Note: the getallpanels function is the $http get request function.