title: How to cancel an ongoing REST-call using Angular's $resource?
body: <p>I've been looking over and over for an example on how to cancel an ongoing REST-call using Angular's $resource. I haven't found any solution yet, but from the Angular documentation I got the impression that it should be possible.</p>
  
  <p>From the documentation:</p>
  
  <p><strong>Usage</strong>:
  $resource(url[, paramDefaults][, actions]); </p>
  
  <p>One of the actions defined in the documentation:</p>
  
  <p><strong>timeout</strong> – {number|Promise} – timeout in milliseconds, or promise that should abort the request when resolved.</p>
  
  <p>Does anyone have a working example showing how to use this timeout action with promise to cancel an ongoing request? Is it possible?</p>