angular/angular.js — pull request #3378 by wesleycho (2013-07-29 05:48:07+00:00)
Title: Added ability for $controller to fetch controller constructor function when expression evaluates to string in scope

This PR adds support for the `$controller` service to evaluate an expression in scope and fetch the appropriate controller constructor function if the evaluated expression is a string.

This addresses [#3375](https://github.com/angular/angular.js/issues/3375).

Example usage:

{{text}}

function ExampleCtrl($scope) {
$scope.currentRoute = {
controller: 'FooCtrl'
};
}

function FooCtrl($scope) {
$scope.text = 'Hello World!';
}