angular/angular.js — pull request #7645 by caitp (2014-05-30 18:12:25+00:00)
Title: feat($compile): isolate scope properties in controller context via controllerAs

It is now possible to ask the $compiler's isolate scope property machinery to
reference properties by their isolate scope.

The current syntax is to prefix the scope name with a '@', like so:

```js
scope: {
"@myData": "=someData",
"@myString": "@someInterpolation",
"@myExpr": "&someExpr"
},
controllerAs: "someCtrl"
```

The putting of properties within the context of the controller will only occur
if controllerAs is used, and the @-prefix is kind of a gross sort of magic.

Benefits:

- $scope[controllerAsName] is available to the controllers constructor
- isolate scope properties are also available to the controllers constructor
- It is now possible to defer calling of an object's constructor via $injector.instantiateLater

Problems:
- The '@'-prefix syntax is gross and I don't like it one bit.
- Extending the directive API is gross and I don't like it one bit.
- Adding new APIs to the injector is gross and I don't like it one bit.
- Some of the refactoring will likely have minor performance implications
- It's possible that there are bugs not being hit due to lack of tests

Related to #7635