title: Algolia backend search with Algolia Search Helper library for Angular.js
body: <p>I'm planning to send the search request to Algolia through the backend for a security issue.
  I discovered <a href="https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/" rel="nofollow noreferrer">here</a> that Instantsearch supports this where you can specify your own <code>customSearchClient</code>, pass it as a parameter and it sends the request there.</p>
  <p>Although Instansearch doesn't support Angular.js, I'm using the <a href="https://github.com/algolia/algoliasearch-helper-js" rel="nofollow noreferrer">Algolia Search Helper</a> library which comes with some helpers for Angular.js. I was wondering if this is possible there also.</p>
  <p>In short I want to implement Algolia backend search with Angular.js without having to worry about building the search query.</p>
  <p>This is how they instantiated the regular search client in their <a href="https://codepen.io/Algolia/pen/PzZobK" rel="nofollow noreferrer">official example</a></p>
  <pre class="lang-js prettyprint-override"><code>'use strict';
  // First let's define the usual configuration variables for our index
  var applicationId = 'latency';
  var apiKey = '249078a3d4337a8231f1665ec5a44966';
  var index = 'bestbuy';
  var client = algoliasearch(applicationId, apiKey);
  
  // Define the `AgoliaSearchHelper` module
  angular.module('AlgoliaSearchHelper', ['ngSanitize']).
  
  // Expose the helper
  factory('helper', function() {
    return algoliasearchHelper(client, index, {
      disjunctiveFacets: ['category'],
      hitsPerPage: 7,
      maxValuesPerFacet: 3
    });
  }).
  ...
  </code></pre>