This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Wrong $resource URL when parameter is int==0 #1212
Comments
benjamine
pushed a commit
to benjamine/angular.js
that referenced
this issue
Aug 20, 2012
when a param value was 0 (or false) it was ignored and removed from url. after this fix that only happens if the value is undefined or null.
I ran into this issue too, I'm sending my fix as pull request |
mhevery
pushed a commit
that referenced
this issue
Sep 4, 2012
Close #1212 when a param value was 0 (or false) it was ignored and removed from url. after this fix that only happens if the value is undefined or null.
mhevery
pushed a commit
that referenced
this issue
Sep 5, 2012
Close #1212 when a param value was 0 (or false) it was ignored and removed from url. after this fix that only happens if the value is undefined or null.
mhevery
pushed a commit
that referenced
this issue
Sep 6, 2012
Close #1212 when a param value was 0 (or false) it was ignored and removed from url. after this fix that only happens if the value is undefined or null.
mhevery
pushed a commit
that referenced
this issue
Sep 6, 2012
Close #1212 when a param value was 0 (or false) it was ignored and removed from url. after this fix that only happens if the value is undefined or null.
mhevery
pushed a commit
to mhevery/angular.js
that referenced
this issue
Sep 7, 2012
Close angular#1212 when a param value was 0 (or false) it was ignored and removed from url. after this fix that only happens if the value is undefined or null.
There was either a regression, or this issue was not fixed for parameters within the URL string.
|
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If resource.userId === 0
calls the wrong url '/users' instead of '/users/0' since userId === 0 is treated as false during uri segment encoding.
I believe it should be checked agains 'undefined' and null instead.
Version 1.0.1
File: angular-resource.js (292)
encodedVal = encodeUriSegment(params[urlParam] || self.defaults[urlParam] || "");
The text was updated successfully, but these errors were encountered: