compact / angular-bootstrap-lightbox

An AngularJS lightbox built using UI Bootstrap Modal.
http://compact.github.io/angular-bootstrap-lightbox/
MIT License
306 stars 134 forks source link

Lightbox is not defined #51

Closed iBasit closed 8 years ago

iBasit commented 8 years ago

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)
    {
    ....
iBasit commented 8 years ago

fixed it by app.controller("ctrl", function($scope, Lightbox)