angular/angular.js — pull request #7991 by btford (2014-06-26 00:15:13+00:00)
Title: feat(ngModel): bind to getters/setters

**WIP: do not merge**

The implementation in this PR changes the semantics of `ngModel` in the following ways:

If the expression bound to `ngModel` resolves to a function, the function is invoked to get the current value to be expressed in the DOM. When the binding changes, if the expression bound to `ngModel` resolves to a function (at that time) the function is invoked with the new value.

I like that to end developers, this feels like "uniform access" for common cases. I don't like that this means there's a difference in semantics between `ngModel` and expressions elsewhere in Angular.

This would be a breaking change.

@IgorMinar suggested a different syntax so that the difference in semantics is obvious. Something like:

```html

```

I like that this makes the semantics obvious. I don't like that this still violates the "uniform access principle."

Closes #768