Hi,

You may keep the search form as generic and delegate the search to section 
based services . Here is my recommendation:

1. Search sets the filter criteria in a filter service and routes the 
application to the selected destination. 
2. Router fetches the data and gives it to the section's controller.

Following is the plunk for this:

http://plnkr.co/edit/zjXXlSzhVRxlDr1pYY2E?p=info

This is not a complete solution. You might have to watch the filter 
criteria for searches done in same section. 

Hope this helps.

Regards,

Vaibhav Gupta

On Sunday, 8 November 2015 16:23:55 UTC+5:30, Steven Ottz wrote:
>
> I have a search bar on every page that asks for destination, arrival and 
> departure date. When the users presses search, an API request is made which 
> then takes you to another routed view in my site.
>
> Looks like Angular can make the request straight away rather than taking 
> you to the page then making the request. Is this correct?
>
> What is the best way to do this? Can I just make the form "Get" data in 
> the url go to the page and then send the data? Or is this kind of an out 
> date method within Angular?
>
> Send Data -> Goto another page on my site (hotels page) -> Display list of 
> hotels from external API matching search input.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to