title: How to use callback in $http Angular JS?
body: <p>I have an service with methods that does requests to server:</p>
  
  <pre><code>this.add = function (data, cb) {
              $http({
                  method: 'POST',
                  url: path
              }).then(function successCallback(response) {
                  cb(response);
  
              }, function errorCallback(response) {
                  // TODO
              });
          };
  </code></pre>
  
  <p>When I call <code>add()</code> as:</p>
  
  <pre><code>genresService.add(function (data) {
     // TODO
  });
  </code></pre>
  
  <p>I get error:</p>
  
  <pre><code>TypeError: cb is not a function
      at successCallback (custom.js:329)
  </code></pre>
  
  <p>on line:</p>
  
  <pre><code>cb(response);
  </code></pre>