marklogic/slush-marklogic-node — pull request #48 by joemfb (2014-10-10 04:01:28+00:00)
Title: adds (optional) stateless-ness to the search controller

These changes add the option to serialize the search query as URL parameters.
This functionality supports deep-linking and the use of the forward and back
browser buttons.

The Search controller updates the URL parameters whenever a search is triggered.
Additionally, it watches the $locationChangeSuccess event, and updates the query
as the URL parameters change. This is done through the StatelessSearch service,
which uses the parse-query.xqy REST extension to convert string queries to
structured queries (when necessary).

Because the Search controller is modifying URL parameters, it can no longer be
always active. Therefore, I've rewritten the mlUser directive to not depend on
a parent scope, and implemented a searchInput directive, which uses a pub/sub-style
service to communicate query changes to the Search controller (events don't work,
since the controller might not be listening when a query is input).

/cc @dmcassel