Hello!
I’m new in Ember.js, so far, it’s being fun to learn so much different things than I’m used to.
So, what I need to do is a search, but it is to search in one resource type only. For example, I have this list of projects that I need to filter them by multiple fields. The search process is done in the back-end, I will access it thru an API.
My API endpoint looks like this:
-
/api/projects
get all projects. -
/api/projects?name=foobar
get all projects that containsfoobar
in the name. -
/api/projects?name=foobar&user_email=foo@bar.com
get all projects that containsfoobar
in the name and hasfoo@bar.com
as the user email.
I think you can get the idea.
My problem is, I can’t find a way to send this data from the form to the controller. I tried to find examples of this kind of problem, but no luck on that All the examples that I found is creating a model for the search and setting the model attributes as the search fields. This is not a option for me since the endpoint is just one and I have only one model called project
.
Note: I’m using ember-data to get the data.
This project that I’m working on is open source, so you can checkout how things are so far: https://github.com/neighborly/neighborly-dashboard/
Any help is very welcome! Thanks.