Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Added URL Suffixes to Resources #1211

Closed
wants to merge 2 commits into from
Closed

Added URL Suffixes to Resources #1211

wants to merge 2 commits into from

Conversation

matsko
Copy link
Contributor

@matsko matsko commented Jul 30, 2012

When using AngularJS with a server-side framework that requires a URL suffix like .json then angular will keep the suffix for all resource variants. So when you have a POST or index request then you end up having URLs that look like "/resource/.json".

Here's the issue in detail:
http://stackoverflow.com/questions/11622665/format-all-model-service-urls-to-include-json-in-angular-js

I've added the code into the repo to fix this. By setting a _suffix variable in the params{} hash when creating a resource then the suffix can be added properly.

@mhevery
Copy link
Contributor

mhevery commented Sep 12, 2012

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

@pkozlowski-opensource
Copy link
Member

@matsko Thank you for your contribution! You've got a valid point that the current $resource doesn't support suffixes.

Unfortunately your pull request can't be merged as is (see my comments for the individual commits). You would need to do:

  • remove changes to the README.md
  • add tests
  • add documentation
  • rebase your changes on the current master (there were some changes in the $resource)

You will also have to sign the CLA as requested by @mhevery , without the CLA signed you PR can't be merged.

@pkozlowski-opensource
Copy link
Member

@matsko We haven't heard from you for a while so I'm going to close this PR. Please re-open it when you've got time working on it and address issues listed above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants