@@ -942,7 +942,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
942942 * registered controller} if passed as a string. An empty `noop` function by default.
943943 * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.
944944 * If present, the controller will be published to scope under the `controllerAs` name.
945- * If not present, this will default to be the same as the component name .
945+ * If not present, this will default to be `$ctrl` .
946946 * - `template` – `{string=|function()=}` – html template as a string or a function that
947947 * returns an html template as a string which should be used as the contents of this component.
948948 * Empty string by default.
@@ -988,14 +988,14 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
988988 * ```js
989989 * var myMod = angular.module(...);
990990 * myMod.component('myComp', {
991- * template: '<div>My name is {{myComp .name}}</div>',
991+ * template: '<div>My name is {{$ctrl .name}}</div>',
992992 * controller: function() {
993993 * this.name = 'shahar';
994994 * }
995995 * });
996996 *
997997 * myMod.component('myComp', {
998- * template: '<div>My name is {{myComp .name}}</div>',
998+ * template: '<div>My name is {{$ctrl .name}}</div>',
999999 * bindings: {name: '@' }
10001000 * });
10011001 *
@@ -1066,7 +1066,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
10661066 var template = ( ! options . template && ! options . templateUrl ? '' : options . template ) ;
10671067 return {
10681068 controller : options . controller || function ( ) { } ,
1069- controllerAs : identifierForController ( options . controller ) || options . controllerAs || name ,
1069+ controllerAs : identifierForController ( options . controller ) || options . controllerAs || '$ctrl' ,
10701070 template : makeInjectable ( template ) ,
10711071 templateUrl : makeInjectable ( options . templateUrl ) ,
10721072 transclude : options . transclude ,
0 commit comments