Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

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

@selenecodes

Description

@selenecodes

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions