angular/angular.js — pull request #3689 by mzgol (2013-08-21 17:47:42+00:00)
Title: feat(ngParse): support trailing commas in object & array literals

Per ECMAScript 5.1 specification trailing commas are allowed in object and
array literals. All modern browsers as well as IE>8 support this syntax.
This commit adds support for such syntax to Angular expressions.

I'm creating a new pull request as @btford asked me to re-open #3685 with an explanation
and I don't have privileges to re-open prs.

Main use case of trailing commas are when using multi-line notation for objects/arrays. When you have sth like:
```javascript
{
par1: "val1",
par3: "val3",
par2: "val2",
}
```
it's much easier to move lines 2. and 3. around without causing errors. Such reordering is cumberscome when trailing commas are ommited. I agree readability is a little reduced when using a single-line form, but for multi-line ones it's IMO a godsend.

Currently there are no good tools to minify Angular expressions so this might be less used form now but once such a tool is created, for longer objects/arrays such notation would help.