angular/angular.js — pull request #2040 by quazzie (2013-02-20 16:10:13+00:00)
Title: feat(select,ng-options): New expression (identify by) in ng-options

Add a new expression (identify by) in ng-options.
This can be used when working with objects. Instead of objects comparing by reference
it will compare by ex. a property.

So you can write:
```javascript
ng-options="obj identify by obj.id as obj.name for obj in objects"
```
The identify part will be used when checking for equality of objects.

Example:
If you get an json object from server with nested objects and a collection of those nested
objects you can use this to select correct object.
```javascript

//scope.user comes as json from server
//scope.buildings comes as jsonarray from server
scope: {
user: {
name: 'Test user',
building: { id: 1, name: 'Office 1', address: 'Bla bla 12', rooms: 4 }
}
buildings: [
{ id: 1, name: 'Office 1', address: 'Bla bla 12', rooms: 4 },
{ id: 2, name: 'Office 2', address: 'Bla bla 13', rooms: 5 },
...
]
}
```
This will correctly select building with id 1 in the select and when select is changed
it will populate the user with the building object selected.