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

fix($resource) Route constructor, updated RegExp #1402

Closed

Conversation

fredrikbonander
Copy link
Contributor

Update RegExp to allow urlParams with out leading slash (/).

  • Will allow reoucese to be loaded from a relative path

Example:
var R = $resource(':path');
R.get({ path : 'data.json' });

Example usage:
Load resources in applications not using webserver, ie local webapp in on a tablet.

Update RegExp to allow urlParams with out leading slash (/).
- Will allow reoucese to be loaded from a relative path

Example:
var R = $resource(':path');
R.get({ path : 'data.json' });

Example usage:
Load resources in applications not using webserver, ie local webapp in on a tablet.
@ghost ghost assigned mhevery Jan 18, 2013
@mhevery
Copy link
Contributor

mhevery commented Jan 18, 2013

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

@fredrikbonander
Copy link
Contributor Author

@mhevery Don't know how you get the registration, but it's filled out and posted. The individual one.

@IgorMinar
Copy link
Contributor

this changed caused regressions.

Resources with template:

/api/myapp/:myresource?from=:from&to=:to&histlen=:histlen

generate urls:

/api/myapp/pear+apple?from=:from&to=:to&histlen=:histlen?from=2012-04-01&histlen=3&to=2012-04-29

should be:

/api/myapp/pear+apple?from=2012-04-01&to=2012-04-29&histlen=3

@fredrikbonander
Copy link
Contributor Author

Updated the regexp (simplified it) and added test for your example.

@mhevery
Copy link
Contributor

mhevery commented Feb 14, 2013

MERGED, thanks

@mhevery mhevery closed this Feb 14, 2013
groner pushed a commit to groner/angular.js that referenced this pull request Nov 12, 2013
This reverts commit 06ed8ef.

The reverted commit causes regressions. See comments in the PR:
angular#1402 (comment)
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