-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support comparison operators with a=b query format #15
Comments
Can you privide a code example of the string to pass in and the expected resilts? Or a reference to the angular.js subsection you are referring to? (I'm haven't used angular.js resources) |
I apologize for the delayed response. Angular resources are described here: https://docs.angularjs.org/api/ngResource/service/$resource. Fundamentally, the issue is that angular doesn't let you specify url query params with a>b format, only a=b. So it would be great if query-to-mongo accepted a=>b as an alternative to a>b. Does that make sense? |
There's also a similar issue with the $exists format. Angular resources won't allow a query like ?a only ?a= |
Ah, I looked in the code and see that |
Sorry for the delay - I see what you were getting at - added the behavior in v0.8.0. |
I've opened issue #18 to address the $exists problem separately. |
Angular.js resources generate query strings with the standard a=p format. So User.query({ age: 21 }) would generate GET: /user/?age=21. That's a problem if we want to use query-to-mongo filters with any operator other than =. For instance, User.query({ age: '>21' }) would generate GET: /user/?age=%3E21, which query-to-mongo doesn't like. It would be great if query-to-mongo would handle age=%3E21 and other comparison operators the same way it handles age%3E21.
The text was updated successfully, but these errors were encountered: