angular-loading-bar icon indicating copy to clipboard operation
angular-loading-bar copied to clipboard

The bar is not loading automatically and being triggered by start() returns undefined.

Open selenecodes opened this issue 9 years ago • 2 comments

What version of angular-loading-bar are you using? 0.9.0 What version of AngularJS are you using? 1.5.7 What browsers are affected? Tested on Chrome Please provide either a JSFiddle, Plunkr example that replicates the issue

Please describe the issue The loading bar was not showing so i added a button with the start() function like you did in you demo. and I get this error:

Cannot read property "start" of undefined
which points towards this javascript function:
$scope.start = function () {
    cfpLoadingBar.start();
};

and the html: <div class="row"> <div class="col-md-12"> <div id="loading-bar-container"></div> </div> </div> <div class="col-md-2"><button ng-click="start()">Start</button></div> and the config:

appModule.config(function (cfpLoadingBarProvider) {
    cfpLoadingBarProvider.parentSelector = '#loading-bar-container';
    cfpLoadingBarProvider.spinnerTemplate = '
Working...
'; });

The spinner works like a charm but the bar is not working. What did you expect to happen? To show the loading bar just like in the demo What actually happened? It gave the error:

Cannot read property "start" of undefined

selenecodes avatar Sep 23 '16 13:09 selenecodes

I agree with @joostblok , I am also facing exactly the same issue

abhisheksaini333 avatar Oct 04 '16 06:10 abhisheksaini333

Can you please provide a reduced test case that illustrates the problem? You keep referring to using it just like the demo, but it clearly works in the demo, so there must be an implementation problem somewhere.

chieffancypants avatar Oct 04 '16 18:10 chieffancypants