From 9383f59148037515593400282cc371cd06944969 Mon Sep 17 00:00:00 2001 From: Igor Lino Date: Mon, 8 Jun 2015 23:49:30 +0200 Subject: [PATCH] Corrected service registration. Directive uses the service. --- bower.json | 2 +- js/angular-colorbox.js | 8 ++++---- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 5dbe519..822f0a9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-colorbox", - "version": "1.1.0", + "version": "1.1.1", "author": { "name": "Igor Lino", "url": "http://igorlino.github.io/angular-colorbox/" diff --git a/js/angular-colorbox.js b/js/angular-colorbox.js index 0229f5e..7c18ddc 100644 --- a/js/angular-colorbox.js +++ b/js/angular-colorbox.js @@ -2,7 +2,7 @@ 'use strict'; angular.module('colorbox', []) - .directive('colorboxService', colorboxService) + .service('colorboxService', colorboxService) .directive('colorbox', colorboxDirective); function colorboxService() { @@ -66,8 +66,8 @@ } } - colorboxDirective.$inject = ['$compile', '$rootScope', '$http', '$parse', '$timeout']; - function colorboxDirective($compile, $rootScope, $http, $parse, $timeout) { + colorboxDirective.$inject = ['$compile', '$rootScope', '$http', '$parse', '$timeout', 'colorboxService']; + function colorboxDirective($compile, $rootScope, $http, $parse, $timeout, colorboxService) { var service = { restrict: 'E', scope: { @@ -116,7 +116,7 @@ if (newValue) { init(newValue); } else { - $.colorbox.close(); + colorboxService.close(); } } diff --git a/package.json b/package.json index 9be9b8f..bf1da03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-colorbox", - "version": "1.1.0", + "version": "1.1.1", "title": "Angular Colorbox", "description": "Angular directive for Colorbox, the jQuery lightbox and modal window plugin.", "keywords": [