Skip to content
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

Angular 1.3 compatibility fix - demo and readme #29

Merged
merged 1 commit into from
Aug 10, 2014

Conversation

pgaertig
Copy link

This completes #20 and fixes #28. The README and demo page have contained deprecated usage of the interceptor. That usage is causing apps to fail after Angular 1.3.x fix was introduced (#20). This fix corrects it that growl interceptor works both in AngularJS 1.2.x and 1.3.x.

@JanStevens
Copy link
Owner

Hello,

So for v1.2.x people should use

$httpProvider.responseInterceptors.push(growlProvider.serverMessagesInterceptor);

For v1.3 people should use

$httpProvider.interceptors.push(growlProvider.serverMessagesInterceptor);

right?

@pgaertig
Copy link
Author

With current master for both AngularJS 1.2.x and 1.3.x apps the only correct way to register the growl interceptor is:

$httpProvider.interceptors.push(growlProvider.serverMessagesInterceptor);

$http.responseInterceptors is deprecated in AngularJS 1.2.x. It accepts only function based interceptors. Since #20 the serverMessagesInterceptor is an object and passing it to responseInterceptors array causes $http problems described in #28.

And here is this PR which modifies docs and demo to use the correct way.

JanStevens pushed a commit that referenced this pull request Aug 10, 2014
Angular 1.3 compatibility fix - demo and readme
@JanStevens JanStevens merged commit f793744 into JanStevens:master Aug 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular 1.3 compatibility fix #20 breaks 1.2.x
2 participants