angular/angular.js — pull request #10467 by caitp (2014-12-15 17:35:33+00:00)
Title: feat($compile): allow using bindToController as object, support both new/isolate scopes

bindToController is now able to be specified as a convenient object notation:

```
bindToController: {
text: '@text',
obj: '=obj',
expr: '&expr'
},
scope: {
notBoundToCtrl: '@someOtherAttr'
}
```

It can also be used in conjunction with new scopes, rather than exclusively isolate scopes:

```
bindToController: {
text: '@text',
obj: '=obj',
expr: '&expr'
},
scope: true
```

PING @petebacondarwin / @johnlindquist

I am not super keen on this, because it makes things much crazier than they used to be. That said:

- Currently, `bindToController` does not automatically imply an isolate scope --- maybe it should (I hate this though)
- It could probably do with more errors being thrown when people use it wrong
- The errors it does throw could be better
- The errors it throws are potentially breaking changes :(

Closes #10420