-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ngProgress injected is not the service but the factory #120
Comments
I'd need to see your controller to find out what is going wrong You should inject the ngProgressFactory:
Then in your controller's function, create an instance of ngProgress:
|
I think it's more a bug than a question because it works on 1.0. I have injected 'ngProgress' into the controller:
If I look to the source: https://github.com/VictorBjelkholm/ngProgress/blob/master/src/provider.js#L3
So It should be possible to use 'ngProgress' but it's not.
And as I said It works on the 1.0 but not on the 1.1 So it means 'ngProgress' is not a service anymore ? Now I need to change from 'ngProgress' to 'ngProgressFactory', create an instance and put it into the scope. You may add a note for this migration path from 1.0 to 1.1 |
Yeah, it may be worthwhile as a note in the readme for upgrading. I have a feeling it was changed to allow multiple instances of ngProgress at any given time. |
A question, do that work on 1.0 ?
|
I understand, adding features is always great but breaking changes are bad To handle this I'm using https://github.com/semantic-release/semantic-release which pump major release depending on your commit message and that is great ! |
Yep, agree. This was before my time. Glad to have solved the mystery though. |
That is weird I have installed it that way:
package.json
then include resources:
app.js
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.
The text was updated successfully, but these errors were encountered: