Skip to content

ngProgress injected is not the service but the factory #120

Open
@toutpt

Description

capture d ecran 2016-05-24 a 11 38 13

That is weird I have installed it that way:

package.json

"ngprogress": "VictorBjelkholm/ngProgress#v1.1.3",

then include resources:

            "node_modules/ngprogress/build/ngProgress.min.js",
            "node_modules/ngprogress/ngProgress.css",

app.js

angular.module('swif.framework', [...
    'ngProgress',
]);

the controller is on the screen shot

Was working on 1.0.7, do not work on 1.1.3 (also tried on 1.1.1)

Any idea ? I think this has to be with the way you handle injection.

You should name the function and then add $inject property on it.

function ngProgressFactory(x,y,z) {}
ngProgressFactory.$inject('x','y','z');
Because you use a factory and return ['x', f(x) {}] I get that array instead of the service.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions