Giter Club home page Giter Club logo

angular-bootstrap-lightbox's Introduction

angular-bootstrap-lightbox

This lightbox displays images using an AngularUI Bootstrap Modal (v0.14).

When the lightbox is opened, navigating to the previous/next image can be achieved by clicking buttons above the image, clicking the left/right arrow keys, or swiping to the left/right (optional with ngTouch). The escape key for closing the modal is automatically binded by AngularUI Bootstrap.

Large images are scaled to fit inside the window. An optional image caption overlays the top left corner of the image.

Demos

Demos / Plunker

Setup

  1. Install in one of the following ways:
  • Install with Bower: bower install angular-bootstrap-lightbox --save
  • Install with npm: npm install angular-bootstrap-lightbox --save
  • Manually save the script and stylesheet from dist.
  1. Include the stylesheet in your app:
<link rel="stylesheet" href="angular-bootstrap-lightbox/dist/angular-bootstrap-lightbox.css">
  1. Include the script in your app:
<script src="angular-bootstrap-lightbox/dist/angular-bootstrap-lightbox.js"></script>
  1. The Angular module is named bootstrapLightbox. Add it as a dependency to your module:
angular.module('app', ['bootstrapLightbox']);
  1. Optional dependencies:

Basic example

Gallery:

<ul ng-controller="GalleryCtrl">
  <li ng-repeat="image in images">
    <a ng-click="openLightboxModal($index)">
      <img ng-src="{{image.thumbUrl}}" class="img-thumbnail">
    </a>
  </li>
</ul>

Controller:

angular.module('app').controller('GalleryCtrl', function ($scope, Lightbox) {
  $scope.images = [
    {
      'url': '1.jpg',
      'caption': 'Optional caption',
      'thumbUrl': 'thumb1.jpg' // used only for this example
    },
    {
      'url': '2.gif',
      'thumbUrl': 'thumb2.jpg'
    },
    {
      'url': '3.png',
      'thumbUrl': 'thumb3.png'
    }
  ];

  $scope.openLightboxModal = function (index) {
    Lightbox.openModal($scope.images, index);
  };
});

Configuration

Changing the appearance of the modal lightbox

The default view template for the lightbox is lightbox.html. Its look can be changed by making your own custom template and/or adding CSS rules; for example, use the selector .lightbox-image-caption to style the caption.

If you make your own template and save it at lightbox.html, no further code is necessary. If you save it at a different path, set it in the provider:

angular.module('app').config(function (LightboxProvider) {
  // set a custom template
  LightboxProvider.templateUrl = 'path/to/your-template.html';
});

Disabling the keyboard navigation

The keyboard navigation in the lightbox with the left/right arrow keys can be enabled/disabled at any time by changing the value of the boolean Lightbox.keyboardNavEnabled.

Array of images

The first argument to Lightbox.openModal must be an array, and its elements may be of any type. In the basic example above, it is an array of objects with properties url and caption, but this is only the default and is not required. To let the Lightbox service know the correct values, set these methods in the provider:

angular.module('app').config(function (LightboxProvider) {
  LightboxProvider.getImageUrl = function (image) {
    return '/base/dir/' + image.getName();
  };

  LightboxProvider.getImageCaption = function (image) {
    return image.label;
  };
});

Image and modal scaling

By default, images are scaled only if they are too large for the modal to contain without scrolling.

If you want all images to be scaled to the maximum possible dimensions, update the Lightbox.fullScreenMode boolean:

angular.module('app').config(function (LightboxProvider) {
  LightboxProvider.fullScreenMode = true;
});

For more custom behaviour, see the documentation of the methods calculateImageDimensionLimits and calculateModalDimensions.

Videos

An element in the array of 'images' is considered a video if it is an object with a type property having the value video (see the demo). To change this, write your own LightboxProvider.isVideo method.

By default, a video is embedded directly if its url ends in .mp4, .ogg, or .webm. Every other url is considered a video from an external sharing service (such as YouTube). To change this check, edit the LightboxProvider.isSharedVideo method. The ng-videosharing-embed library is used for embedding shared videos if it is included in your app. You can use another video library by changing the template.

For now, the maximum video dimensions are fixed at 1280x720 (16:9).

Development

  • API documentation of the services and directive in the Angular module

  • Setup:

    npm install
    bower install
  • Build:

    grunt
  • Generate docs:

    grunt jsdoc2md
  • Serve the GitHub Pages:

    git checkout gh-pages
    git checkout master -- dist/angular-bootstrap-lightbox.min.js dist/angular-bootstrap-lightbox.min.css
    bundle install
    bundle exec jekyll serve

angular-bootstrap-lightbox's People

Contributors

azachar avatar compact avatar jhdrn avatar reppners avatar tafel avatar tylercd100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-bootstrap-lightbox's Issues

Mark as template

In order to properly load lightbox.html it was necessary to us, to wrap the markup in

<script type="text/ng-template" id="lightbox.html">
/* Content of lightbox.html goes here */
</script>

Maybe you can add those lines on your own :)

How do I synchronize objects of the same Array , with the index on different pages?

Hi,
I put the images on different pages using the ng-repeat and the custom filter | filterBy : [ 'id '] , ' ' " , only just the image of the first object in the array of the list is expanded correctly , the other I need go adding +1 , +2 , +3 and successively. The third object in the array only magnifies the image properly if I add ($index+2) , eg .

 $scope.Images = 
[
   { id="1", url: "/images/img-1.jpg", src: "/images/img-1.jpg" },
   { id="2", url: "/images/img-2.jpg", src: "/images/img-2.jpg" },
   { id="3", url: "/images/img-3.jpg", src: "/images/img-3.jpg" } 
];

The object that is the first in Array $ scope.images list functions normally

 <div ng-controller="QuadrinhosCtrl">
 <div ng-repeat="image in images | filterBy: ['id']: '1'">
   <a ng-click="openLightboxModal($index)" title="Ampliar Imagem">
    <img ng-src="{{image.src}}" width="655" height="406" class="img-thumbnail" >
    </a>
 </div>
</div>

The object that is second on the list of Array $ scope.images only works if I add +1 to $ index

<div ng-controller="QuadrinhosCtrl">
 <div ng-repeat="image in images | filterBy: ['id']: '2'">
   <a ng-click="openLightboxModal($index+1)" title="Ampliar Imagem">
    <img ng-src="{{image.src}}" width="655" height="406" class="img-thumbnail" >
    </a>
 </div>
</div>

The object that is third on the list of Array $ scope.images only works if I add +2 at $ index

<div ng-controller="QuadrinhosCtrl">
 <div ng-repeat="image in images | filterBy: ['id']: '3'">
   <a ng-click="openLightboxModal($index+2)" title="Ampliar Imagem">
    <img ng-src="{{image.src}}" width="655" height="406" class="img-thumbnail" >
    </a>
 </div>
</div>

I wonder if this directive works by placing the images (objects) , the same array, in different pages , if so, how could do it ?

Thanks.

modal-footer not suported?

When i added a footer to modal view, then it is visible under the white background.

<div class="modal-body">
...
</div>
<div class="modal-footer">
    <p>The Footer</p>
    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>

Only display nav if there is more than one image

To use your module as replacement for jQuery prettyPhoto (which is GPL v2-licensed) I needed to make some adjustments.

To me, the lightbox nav is only required, if I load more than one image into the modal (which I don't).
So I added data-ng-if="Lightbox.images.length > 1" to the .btn-group of .lightbox-nav.

Maybe you want to adjust your template as well ;-)

Define a custom controller for the lightbox

I've took your starting example and tried to achive the following: Modify the lightbox.html to include a button to perform a custom action in the main controller.

So far I've done the following:

angular.module('app').controller('GalleryCtrl', function ($scope, Lightbox) {
  $scope.images = [....];

  $scope.openLightboxModal = function (index) {
    Lightbox.openModal($scope.images, index);
  };

  $scope.myNewFunction = function (image) {
    // Do something with image
 }
});

And the part of the modified lightbox.html including the button is:

<button type="button" btn-click="myNewFunction(Lightbox.image)" class="btn btn-danger">Do something</button>

But as fas as I understand, it's not possible to pass a controller to the lightbox, is it right?
Is there any way to achieve it with the current implementation?

Lightbox is undefined

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?

isVideo error when passing image name string

Hi,

I'm starting to use the ligthbox, I tried to create a quick sample, passing the image url to the lightbox instead a complex object, but I'm getting and error with the function isVideo, trying to check the image.type. Does it mean that the image needs to be a complex object containing a type always?

Thanks!

P.S great work!!

Is it possible video (mp4, webm)

I would like to use video sources too. Like Mp4 and webm. Do you have any plan to encompass it?

Nice piece of software btw!

Cheers,
Luca

Plunker for this Awesome module

Hi,

I have created a Plunker for this Awesome module.If you can put that on your home page then it'll help for everyone.Thanks for the great work.Keep it up ๐Ÿ‘

Here it is : Plunker

Unknown provider: LightboxProvider <- Lightbox

I am trying to use this with ionic project, but I keep having this kind of bug:

ionic.bundle.js:21157 Error: [$injector:unpr] Unknown provider: LightboxProvider <- Lightbox <- propertyDamageController
http://errors.angularjs.org/1.4.3/$injector/unpr?p0=LightboxProvider%20%3C-%20Lightbox%20%3C-%20propertyDamageController
    at ionic.bundle.js:8895
    at ionic.bundle.js:13089
    at Object.getService [as get] (ionic.bundle.js:13236)
    at ionic.bundle.js:13094
    at getService (ionic.bundle.js:13236)
    at invoke (ionic.bundle.js:13268)
    at Object.instantiate (ionic.bundle.js:13285)
    at ionic.bundle.js:17841
    at self.appendViewElement (ionic.bundle.js:52255)
    at Object.switcher.render (ionic.bundle.js:50449)

Here is what I inject into my ionic app:

angular.module('starter', ['ionic', 'ionic-material', 'ionic-toast', 'ngCordova','starter.model', 'starter.factory', 'ui.router','ngPDFViewer','ui.bootstrap', 'bootstrapLightbox'])

function propertyDamageController($scope, $state, $cordovaCamera, vehicle, Lightbox) {

angular-bootstrap-lightbox.min.js is broken

The provided angular-bootstrap-lightbox.min.js is broken. Using this file as the lightbox src produces the following error when you inject Tabletop into a controller:

Error: [$injector:unpr] http://errors.angularjs.org/1.2.18/$injector/unpr?p0=aProvider%20%3C-%20a%20%3C-%20Lightbox%20%3C-%20imageSliderDirective
    at Error (native)
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:6:450
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:36:145
    at Object.c [as get] (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:34:236)
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:36:213
    at c (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:34:236)
    at Object.d [as invoke] (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:34:453)
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:36:231
    at c (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:34:236)
    at Object.d [as invoke] (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js:34:453)

Switching to angular-bootstrap-lightbox.js resolves this issue.

Troubles with loading image in FF (38.0.1)

When i'm opening lightbox by clicking on any image on my page and image loaded and after this image's height\width becomes 0px. I'm try to debug this and found reason of that behavior:
ImageLoader.load(src) promise generate both event success and failure...
In the Chrome failure fire before success and we see no problems, but in FF success fire before failure and it resize to 0px.

OK, i'm deep more in this function and found intresting thing,

scope.$watch(function () {
return attrs.lightboxSrc;
}

fires two times,

1st time with attrs.lightboxSrc == "" and Lightbox.index == -1
2st time with attrs.lightboxSrc == %MyUrl% and Lightbox.index == %MyIndex%

I'm fix this by this code

if(Lightbox.index < 0){
return
}

before

ImageLoader.load(src).then(function (image) {})

But i dont wanna to pull request cause i dont know how correct my code >.<

Sorry for my English, its not my native :)

Why is it asking for a different directive template?

I have a directive I made called Rating. Only when I load the bootstrapLightbox module, get:

GET http://localhost:8000/app/template/rating/rating.html 404 (Not Found)
Error: [$compile:tpload] Failed to load template: template/rating/rating.html (HTTP status: 404 Not Found)

A that's not the templateUrl for that directive.

Then, when I satisfy this request I get:

Error: [$compile:tplrt] Template for directive 'rating' must have exactly one root element. template/rating/rating.html

I have other directives in the same view and before rating and they are still working.

naive assumption of default interpolateProvider

At https://github.com/compact/angular-bootstrap-lightbox/blob/master/src/lightbox.html it is assumed that the developer is using default interpolate start and end symbols. E.g. in ng-href="{{Lightbox.imageUrl}}"

However, many developer use different symbols for compatibility reasons (e.g. with server side templating engines).

There is a plunker to demonstrate this issue:

http://plnkr.co/edit/Rum0RqcqIsGNIvp6LQnS?p=preview

In demo1.js file you'll see commented lines 4,5 and 6 (the symbol interpolation we make for angular to prevent conflict with php syntax). If you remove the comment try to run it with interpolation of characters then it results in the same error I have in my code. This is due to the syntax symbols of the angular-bootstrap-lightbox.js library not being interpolated (e.g. lightbox modal html is with {{}} syntax).

Do you have any suggestions how to overcome this problem?

ui.bootstrap dependency

I'm currently trying to use your plugin but i have a problem i'm currently using the custom build of ui.bootstrap directly from the repository 'https://github.com/angular-ui/bootstrap' but I have a problem of dependency with your plugin. You are using: 'ui.bootstrap' as dependency but do you really use it ?

angular.module('bootstrapLightbox', [
'ui.bootstrap'
]);

The problem is that if you are doing custom build of ui.bootstrap the injection is used like : 'ui.bootstrap.modal' and there is no 'ui.bootstrap' so I can't use your plugin.

Regards,

Gaetan SENN

Lightbox is not defined

I'm using require library.

angular-bootstrap-lightbox gets loaded, but when I run the function I get

Lightbox is not defined

I have to use define to load the library and angular controller

define(['app', 'angular-bootstrap-lightbox'], function (app)
{
"use strict";

    app.requires.push('bootstrapLightbox');

    app.controller("ctrl", function($scope)
    {
    ....

Trim the left & right margins

I'm trying to fit this lightbox into a mobile screen. There is a huge amount of margins on the left & right of every image.

I'm not sure how to go about customizing this. I see the "calculateImageDimensionLimits" & "calculateModalDimensions" but don't know how to change any of those values. Should those hard-coded numbers be baked into the configuration?

can't show images on ios.

Hi, I have a problem with images on ios. Images has with width=1px height=0px. I can resolve it with getting height and width on image.onload in lightboxSrc directive.

was

var image = new Image();
image.src = src;

// these variables must be set before resize(), as they are used in it
imageWidth = image.naturalWidth;
imageHeight = image.naturalHeight;

resize();

I do

var image = new Image();
image.src = src;
image.onLoad = function(){
    imageWidth = image.naturalWidth;
    imageHeight = image.naturalHeight;
    resize();
};

it's work, but I don't know, is it good solution.

How to catch the promise on close?

Sorry if this is a simple question, but how do I catch the promise when the lightbox is closed? I was hoping if I had:

var instance = Lightbox.openModal(images,index);

I could then do this:

instance.result.then(function (result) {...});

But it doesn't seem to catch the promise?
Thanks,
Bob

No blurred (black, opacity 0.5) background

Modal-backdrop isn't correctly displayed. I think the height of 0px is to small and that's the reason why the whole background layer is missing.

Please compare bootstrap modal with your demo for proof.

Thank you.

Lightbox.keyboardNavEnabled overwritten by hardcoded values.

Seems that the Lightbox.keyboardNavEnabled is not working. It would appear that the parameter is being forced to "true" when openModal is called. Me thinks this is probably not the desired behavior as it completely overrides the user setting from controller.

`
Lightbox.openModal = function (newImages, newIndex, modalParams) {
Lightbox.images = newImages;
Lightbox.setImage(newIndex);

  // store the modal instance so we can close it manually if we need to
  Lightbox.modalInstance = $uibModal.open(angular.extend({
    'templateUrl': Lightbox.templateUrl,
    'controller': ['$scope', function ($scope) {
      // $scope is the modal scope, a child of $rootScope
      $scope.Lightbox = Lightbox;

      Lightbox.keyboardNavEnabled = true;
    }],
    'windowClass': 'lightbox-modal'
  }, modalParams || {}));

`

Support backdrop 'static'

Does this support angular-ui-boostrap modal services like backdrop static? Are there any future plans on enabling these options per instance rather globally? Thanks!

Make images and index variable available

I need to add some actions on each image. For that I make a custom template wish call some new method injected by decorator :

    $provide.decorator('Lightbox', function($delegate) {
        $delegate.deleteImage = function(image) {
            alert("delImage : " + this.images + ", id" + image.id + ", index:", this.index);
            this.images.splice(this.index, 1);
            if (this.images.length == 0) this.closeModal()
        };
        return $delegate;
    });

to work, I need to have access to theses variables and make some changes :

    var Lightbox = {};

    // array of all images to be shown in the lightbox (not Image objects)
    Lightbox.images = [];

    // the index of the image currently shown (Lightbox.image)
    Lightbox.index = -1;

can you add this in next release ?

thanks

showing encoded image without url (base64)

Hello,
i'm currently displaying my images using base64_encode so my tag looks like this

div ng-click="openLightboxModal($index)">
img ng-src="data:image/JPEG;base64,{{item.hash}}"

So i got this issue when i click on my image it says "Failed to load image", because i think he wants to load it from a url, which i'm not able to give him to.

Is there a way around ? Or did i missed something ?

Thanks

open modal auto top scroll at the first time

My photo wall is at the end of the page. (after 3/4 block)
so when a user click on a picture, the modal open at the top (scroll top).
when the user close the modal, he has to scroll back to the photowall.

Then, if he want to display the modal again, the modal open at the good position (when the user clicks).

Do you have any idea to disable the first scroll top ?

"videosharing-embed" not load

The module ""videosharing-embed"" that you are trying to load does not exist. [$injector:nomod] Module 'videosharing-embed' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.(โ€ฆ)

Set a flag on loading images to be used for showing a loading-state animation element

Thank you for this excellent module!

Would it make sense to expose a flag for each image that is being loaded via the ImageLoader service, for e.g. image.isLoaded. It could be set to true after the ImageLoader promise is resolved in the Lightbox.setImage method. It would help in toggling an animation element to let the user know that images are being loaded in the background.

I am using another sweet module for showing progress of global $http/$resource promises (angular-loading-bar), but I believe it'd be even better UX if a different loading indicator appears in the center of the space where the loaded image would show up.

Does this make sense? Or is it possible to achieve that with custom templates as it is that I couldn't figure out?

Modal width sizing

It would be really nice if there was a feature for creating(or controlling) the modal size

Modal Background Not closing

The background/overlay does not hide when I close the dialogue box (either clicking off or clicking the "close" button).

Multi language

Is it possible to add some multi language features to the lib? For now I have to fork repo and replace "< Previous" and "Next >" buttons by glyphicon-chevron-left/right icons and remove "Open in new tab" button. It would be nice add some configuration for this.

Fix for demo3

Demo3 has an error.
Replace in modal template:

<img lightbox-src="" alt="">

to:

<img lightbox-src="{{Lightbox.imageUrl}}" alt="">

Blank page

If I implement the JS file to the HTML part (script tag) it makes the page to appear blank.
It just loads up, changes the background color maybe, but that's it. Nothing more happens. No error in console either.

If I remove the JS file from the DOM again, it just works fine again.

Mobile input keyboard does not open

Regular inputs work fine but inputs on a modal popup start to bring up the keyboard but then remove it. The only way to get keyboard to open fully is to touch input for an extended time.

Works fine on desktop, so to see the problem must use a mobile device.
http://plnkr.co/edit/cdAH7gjHToZf2KiNwBYK

Tested on iPad 8.1 and android 4.4.4 both using chrome 38.

How to change default url value

i have an array of objects with the image path stored in image_name value. In your example you have used url. How do i change this value in the LightboxProvider?

the "x" isn't rendering properly in the lightbox

When the page renders, I get:
<button class="close" aria-hidden="true" ng-click="$dismiss()">รƒโ€”</button>

should be:
<button class="close" aria-hidden="true" ng-click="$dismiss()">x</button>

I checked the angular-bootstrap-lightbox.js file and it shows the "x" appropriatley.
screen shot 2016-05-14 at 7 31 19 pm

NPM install is missing index.js

When installing via NPM the index.js is missing. #41

And something else:
(I'm rather new with webpack so maybe this is just a mistake on my end.)
Shouldn't the index.js file require the css file? like so:

require("./dist/angular-bootstrap-lightbox.css");
require('./dist/angular-bootstrap-lightbox');
module.exports = 'angular-bootstrap-lightbox';

Because without this the css doesn't emerge.

Read $scope.images from template

Because I don't know the URLs ahead of time, I needed a way to figure out them on runtime.

My solution was to add data-attributes in the server-side generated template like so:

<div data-ng-controller="GalleryController" data-lightbox-url="{{ backend.interpolated.url }}" data-lightbox-thumbnail="{{ backend.interpolated.url }}" data-lightbox-caption="{{ backend.interpolated.value }}">
    <img src="{{ data-lightbox-thumbnail.from.above }}" alt="{{ data-lightbox-caption.from.above }}" data-ng-click="openLightbox()" />
</div>

(One could render JSON into the data-attributes as well ;-))

In my GalleryController, I filled $scope.images like so:

$scope.images = [{
    url: $attrs.lightboxUrl,
    thumbUrl: $attrs.lightboxThumbnail,
    caption: $attrs.lightboxCaption
}];

I open the modal like

$scope.openLightbox = function() {
    Lightbox.openModal($scope.images, 0);
});

Feel free to extend your API :)

Center image

Hi,
Great module.
Is there anyway to configure it to display the images/videos in the center of the screen?
I have some images too small and they appear on the top of the screen with just the 30px top margin given by bootstrap.

Angular 1.3 & Angular Bootstrap 0.13

Hi, I think the latest release of this plugin (0.6) specifies the bower dependencies as:

"angular": "^1.3.15"
"angular-bootstrap": "^0.12.1"

As far as I know, Angular Bootstrap didn't support Angular 1.3 until version 0.13, which was recently released.

This leads to warnings about potential code incompatibility. E.g.

angular-bootstrap#0.13.0 incompatible with ^0.12.1
Resort to using angular-bootstrap#~0.13 which resolved to angular-bootstrap#0.13.0
Code incompatibilities may occur.

Is there any plan to support angular-bootstrap 0.13 in the near future?

Thanks, and thanks also for the work going into this plugin!

Support for newer bootstrap version

Is it possible to make this compatible with newer bootstrap version?

Now it seems to require 0.14 version but seems to also work with newer versions of UI bootstrap. I did a quick test with UI Bootstrap 1.3.2.

uibModal service not being injected?

Having the same issue as this user.

This is the console error

Unknown provider: $uibModalProvider <- $uibModal <- Lightbox <- Lightbox

ui.boostrap is being required correctly and used on other elements in the same controller

var accountApp = angular.module('accountApp', [
  'ngRoute',
  'ngResource',
  'messageModule',
  'accountControllers',
  'ui.bootstrap',
  'Devise',
  'braintree-angular',
  'ngFileUpload',
  'bootstrapLightbox',
]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.