I have been working on an Angular function that adds a new slide when clicked with a ng-click event.
var addSlide = function($scope, slideIndex, $event) {
slideIndex++;
var slider = angular.element('.slick-slider');
var currentSlide = slider.slick('slickCurrentSlide');
slider.slick('slickAdd', '<div class="slide" ng-click="addPhoto(); $event.stopPropagation();"><input type="file" class="camera-trigger" accept="image/*"><img class="photo-img" src="" /></div>');
};
Unfortunately, dynamically created ng-click events are not functioning properly (ng-click not working from dynamically generated HTML). How can I resolve this issue since it is a function within a controller rather than a directive?