angular-slick-carousel icon indicating copy to clipboard operation
angular-slick-carousel copied to clipboard

Calling slickRemove from Controller

Open dev408 opened this issue 9 years ago • 1 comments

I would like to be able to call slickRemove from my controller as I need to do a call to a REST service in addition to removing it from the view. I can't seem to get the syntax to reference that method from the controller.

Also, I was trying to get the current index to use in the view to delete the current slide but when I call slickRemove referencing the variable $scope.slickCurrentIndex when it gets to the function to remove it the index is undefined. Though I can see the correct index in the view.

dev408 avatar May 26 '16 16:05 dev408

I have the same issue...please help.

<slick settings="slickConfig" dots=true infinite="true" slides-to-show="1" slides-to-scroll="1" init-onload="true" data="point.Images">
              <div class="slick-item" ng-repeat="image in point.Images">
                <img class="d-block" ng-src="{{image.ImageLinkBig}}" />
                <div class="delete-image" ng-click="deletePointImage(image.ID)"><md-icon ng-bind="'delete'"></md-icon></div>
              </div>
            </slick>
/* Image Management */
		$scope.slickConfig = {
	        method: {}
	    }

		$scope.deletePointImage = function(id) {
			$scope.slickConfig.slickRemove(3)
		}

returns a console error: VM3348 angular.js:28723 TypeError: $scope.slickConfig.slickRemove is not a function

nimeso avatar Nov 14 '18 07:11 nimeso