angular-loading-bar
angular-loading-bar copied to clipboard
The bar is not loading automatically and being triggered by start() returns undefined.
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 undefinedwhich 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
I agree with @joostblok , I am also facing exactly the same issue
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.