Skip to content

Conversation

tonycapone
Copy link
Contributor

Hi, thanks for sharing this great project! The only issue I had was when using SpringDataRestInterceptor, it was intercepting everything, including my angular-ui-router templates, and blowing up while trying to process them, since they're just strings.

I noticed it was blowing up here:
https://github.com/guylabs/angular-spring-data-rest/blob/master/src/angular-spring-data-rest-provider.js#L218-L221

The most unobtrusive fix that I can think of is to check that response.data is of type object before calling process(), if it's not, let it pass through unchanged.

This change cleared up the issues I was having with the angular-ui-router templates. Thanks!

@guylabs
Copy link
Owner

guylabs commented Aug 10, 2015

Hi Tony,

thanks a lot for the pull request! :) Yes that is true it intercepts everything but I think this is a good addition. And nice that you wrote a test for it.

You then need to use the head of the repository in bower such that you have these changes through bower, as I won't release a new version in the near future.

Thanks and regards,

Guy

guylabs added a commit that referenced this pull request Aug 10, 2015
interceptor intercepts angular-ui templates
@guylabs guylabs merged commit bda7392 into guylabs:master Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants