angular/angular.js — pull request #5560 by nvie (2013-12-29 01:42:05+00:00)
Title: Make stripping of trailing slashes configurable for `ngResource.$resource`

By default, trailing slashes will be stripped from the calculated URLs, which can pose problems with server backends that do not expect that behavior. This patch aims to make this behavior configurable via:

```javascript
app.config(['$resourceProvider', function ($resourceProvider) {
// Don't strip trailing slashes from calculated URLs
$resourceProvider.setStripTrailingSlashes(false);
}]);
```

This is targeted to be a fix for #992. Please let me know if anything is missing from this, or you need me to change anything to make the implementation more idiomatic.

---

PS: I'm sorry for the seemingly large patch, but most of it is just indentation (due to rewriting the factory as a provider). I've tried to isolate the whitespace change in a separate commit.