angular-ui/ui-select — pull request #420 by richardallen (2014-11-19 17:38:49+00:00)
Title: Use object property of `track by` for comparison

This expands on PR #256 to improve efficiency, clean up the code, and use `track by` in single as well as multiple configurations.

* Moved the regular expression that determines the property name into `RepeatParser`.
* Cleaned up the formatter logic by breaking into functions that are created only once when the formatter is added.
* Used the object property specified via `track by` for comparisons in both single and multiple configuration.
* Added unit tests for both single and multiple configuration.
* Used `angular.equals` instead of `==` for comparison. The AngularJS [`ngOptions` directive](https://code.angularjs.org/1.2.26/docs/api/ng/directive/select) notes that it [compares by reference, not value](http://jsfiddle.net/qWzTb/), so it seems natural that angular-ui-select would do the same. However, several developers have posted issues on this behavior causing problems, so using `angular.equals` seems like a better choice. This change was made with a separate commit, so the rest of this PR could be merged without that commit.