We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to user angular-bootstrap-lightbox via angular directive.
app.directive('productBuyers', ['Product', function(Product, Lightbox) { return { restrict : 'E', scope : {}, template : '<div>' + '<p class="product-buyers-header bold" ng-show="photos.length">Others who have bought this product:</p>' + '<div class="product-buyers-container">' + '<div class="product-buyer placeholder square" ng-hide="photos.length"></div>' + '<div class="product-buyer square" ng-click="openLightboxModal($index)" ng-repeat="photo in photos | limitTo:3" ng-style="{\'background-image\':\'url(\' + photo.image + \')\'}"></div>' + '<div class="clear"></div>' + '</div>' + '</div>', link : function($scope, element, attrs) { $scope.photos = []; function getImages() { Product.customerPhotos(attrs.productId).success(function(response) { $scope.photos = response.data; Squares.init(); }).error(function(response) { console.log("There was a problem getting the product images"); }); } $scope.openLightboxModal = function (index) { Lightbox.openModal($scope.photos, index); }; getImages(); } } }]);
it says " Lightbox is undefined". I am not sure how can I use it with directive. Is there any way to do it?
The text was updated successfully, but these errors were encountered:
app.directive('productBuyers', ['Product', function(Product, Lightbox) {
change this; app.directive('productBuyers', ['Product', 'Lightbox', function(Product, Lightbox) {
app.directive('productBuyers', ['Product', 'Lightbox', function(Product, Lightbox) {
thats the problem.
Sorry, something went wrong.
No branches or pull requests
I am trying to user angular-bootstrap-lightbox via angular directive.
it says " Lightbox is undefined". I am not sure how can I use it with directive. Is there any way to do it?
The text was updated successfully, but these errors were encountered: