Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
refactor(tagsInput): Renamed configuration service
Browse files Browse the repository at this point in the history
Renamed configuration service as tagsInputConfig since 'configuration'
is a common name and it may exist another service in the app using
the directive with the very same name.
  • Loading branch information
mbenford committed Dec 7, 2013
1 parent 3f8674e commit 0784d71
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions build/ng-tags-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var tagsInput = angular.module('tags-input', []);
* @param {expression} onTagAdded Expression to evaluate upon adding a new tag. The new tag is available as $tag.
* @param {expression} onTagRemoved Expression to evaluate upon removing an existing tag. The removed tag is available as $tag.
*/
tagsInput.directive('tagsInput', ["$timeout","$document","configuration", function($timeout, $document, configuration) {
tagsInput.directive('tagsInput', ["$timeout","$document","tagsInputConfig", function($timeout, $document, tagsInputConfig) {
function SimplePubSub() {
var events = {};

Expand Down Expand Up @@ -73,7 +73,7 @@ tagsInput.directive('tagsInput', ["$timeout","$document","configuration", functi
var events = new SimplePubSub(),
shouldRemoveLastTag;

configuration.load($scope, $attrs, {
tagsInputConfig.load($scope, $attrs, {
customClass: { type: String, defaultValue: '' },
placeholder: { type: String, defaultValue: 'Add a tag' },
tabindex: { type: Number },
Expand Down Expand Up @@ -266,7 +266,7 @@ tagsInput.directive('tagsInput', ["$timeout","$document","configuration", functi
* suggestions list.
* @param {number=} [maxResultsToShow=10] Maximum number of results to be displayed at a time.
*/
tagsInput.directive('autoComplete', ["$document","$timeout","$sce","configuration", function($document, $timeout, $sce, configuration) {
tagsInput.directive('autoComplete', ["$document","$timeout","$sce","tagsInputConfig", function($document, $timeout, $sce, tagsInputConfig) {
function SuggestionList(loadFn, options) {
var self = {}, debouncedLoadId, getDifference;

Expand Down Expand Up @@ -346,7 +346,7 @@ tagsInput.directive('autoComplete', ["$document","$timeout","$sce","configuratio
var hotkeys = [KEYS.enter, KEYS.tab, KEYS.escape, KEYS.up, KEYS.down],
suggestionList, tagsInput, highlight;

configuration.load(scope, attrs, {
tagsInputConfig.load(scope, attrs, {
debounceDelay: { type: Number, defaultValue: 100 },
minLength: { type: Number, defaultValue: 3 },
highlightMatchedText: { type: Boolean, defaultValue: true },
Expand Down Expand Up @@ -469,12 +469,12 @@ tagsInput.directive('transcludeAppend', function() {

/**
* @ngdoc service
* @name tagsInput.service:configuration
* @name tagsInput.service:tagsInputConfig
*
* @description
* Loads and initializes options from HTML attributes. Used internally for tagsInput and autoComplete directives.
*/
tagsInput.service('configuration', ["$interpolate", function($interpolate) {
tagsInput.service('tagsInputConfig', ["$interpolate", function($interpolate) {
this.load = function(scope, attrs, options) {
var converters = {};
converters[String] = function(value) { return value; };
Expand Down
Binary file modified build/ng-tags-input.min.zip
Binary file not shown.
Binary file modified build/ng-tags-input.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions src/auto-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* suggestions list.
* @param {number=} [maxResultsToShow=10] Maximum number of results to be displayed at a time.
*/
tagsInput.directive('autoComplete', function($document, $timeout, $sce, configuration) {
tagsInput.directive('autoComplete', function($document, $timeout, $sce, tagsInputConfig) {
function SuggestionList(loadFn, options) {
var self = {}, debouncedLoadId, getDifference;

Expand Down Expand Up @@ -98,7 +98,7 @@ tagsInput.directive('autoComplete', function($document, $timeout, $sce, configur
var hotkeys = [KEYS.enter, KEYS.tab, KEYS.escape, KEYS.up, KEYS.down],
suggestionList, tagsInput, highlight;

configuration.load(scope, attrs, {
tagsInputConfig.load(scope, attrs, {
debounceDelay: { type: Number, defaultValue: 100 },
minLength: { type: Number, defaultValue: 3 },
highlightMatchedText: { type: Boolean, defaultValue: true },
Expand Down
4 changes: 2 additions & 2 deletions src/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

/**
* @ngdoc service
* @name tagsInput.service:configuration
* @name tagsInput.service:tagsInputConfig
*
* @description
* Loads and initializes options from HTML attributes. Used internally for tagsInput and autoComplete directives.
*/
tagsInput.service('configuration', function($interpolate) {
tagsInput.service('tagsInputConfig', function($interpolate) {
this.load = function(scope, attrs, options) {
var converters = {};
converters[String] = function(value) { return value; };
Expand Down
4 changes: 2 additions & 2 deletions src/tags-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var tagsInput = angular.module('tags-input', []);
* @param {expression} onTagAdded Expression to evaluate upon adding a new tag. The new tag is available as $tag.
* @param {expression} onTagRemoved Expression to evaluate upon removing an existing tag. The removed tag is available as $tag.
*/
tagsInput.directive('tagsInput', function($timeout, $document, configuration) {
tagsInput.directive('tagsInput', function($timeout, $document, tagsInputConfig) {
function SimplePubSub() {
var events = {};

Expand Down Expand Up @@ -61,7 +61,7 @@ tagsInput.directive('tagsInput', function($timeout, $document, configuration) {
var events = new SimplePubSub(),
shouldRemoveLastTag;

configuration.load($scope, $attrs, {
tagsInputConfig.load($scope, $attrs, {
customClass: { type: String, defaultValue: '' },
placeholder: { type: String, defaultValue: 'Add a tag' },
tabindex: { type: Number },
Expand Down

0 comments on commit 0784d71

Please sign in to comment.