Skip to content

Commit

Permalink
issue chieffancypants#27: now actually configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmingoia committed Jan 3, 2014
1 parent ba17938 commit c2e59fc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/loading-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ angular.module('chieffancypants.loadingBar', [])
/**
* The amount of time spent fetching before showing the loading bar
*/
var latencyThreshold = cfpLoadingBar.latencyThreshold || 100;
var latencyThreshold = cfpLoadingBar.latencyThreshold;

/**
* calls cfpLoadingBar.complete() which removes the
Expand Down Expand Up @@ -146,6 +146,7 @@ angular.module('chieffancypants.loadingBar', [])

this.includeSpinner = true;
this.includeBar = true;
this.latencyThreshold = 100;
this.parentSelector = 'body';

this.$get = ['$document', '$timeout', '$animate', '$rootScope', function ($document, $timeout, $animate, $rootScope) {
Expand Down Expand Up @@ -265,13 +266,14 @@ angular.module('chieffancypants.loadingBar', [])
}

return {
start : _start,
set : _set,
status : _status,
inc : _inc,
complete : _complete,
includeSpinner : this.includeSpinner,
parentSelector : this.parentSelector
start : _start,
set : _set,
status : _status,
inc : _inc,
complete : _complete,
includeSpinner : this.includeSpinner,
latencyThreshold : this.latencyThreshold,
parentSelector : this.parentSelector
};


Expand Down

0 comments on commit c2e59fc

Please sign in to comment.