Skip to content

Commit

Permalink
Corrected service registration.
Browse files Browse the repository at this point in the history
Directive uses the service.
  • Loading branch information
Igor Lino committed Jun 8, 2015
1 parent 3210165 commit 9383f59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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/"
Expand Down
8 changes: 4 additions & 4 deletions js/angular-colorbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

angular.module('colorbox', [])
.directive('colorboxService', colorboxService)
.service('colorboxService', colorboxService)
.directive('colorbox', colorboxDirective);

function colorboxService() {
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -116,7 +116,7 @@
if (newValue) {
init(newValue);
} else {
$.colorbox.close();
colorboxService.close();
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit 9383f59

Please sign in to comment.