Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit fcaca73

Browse files
committed
docs($compile,$route): reword "controller alias" to clarify
Clarify that these aliases are identifier names used to reference the controller.
1 parent 4ed70af commit fcaca73

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/ng/compile.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* templateNamespace: 'html',
6565
* scope: false,
6666
* controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
67-
* controllerAs: 'stringAlias',
67+
* controllerAs: 'stringIdentifier',
6868
* require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
6969
* compile: function compile(tElement, tAttrs, transclude) {
7070
* return {
@@ -224,9 +224,10 @@
224224
*
225225
*
226226
* #### `controllerAs`
227-
* Controller alias at the directive scope. An alias for the controller so it
228-
* can be referenced at the directive template. The directive needs to define a scope for this
229-
* configuration to be used. Useful in the case when directive is used as component.
227+
* Identifier name for a reference to the controller in the directive's scope.
228+
* This allows the controller to be referenced from the directive template. The directive
229+
* needs to define a scope for this configuration to be used. Useful in the case when
230+
* directive is used as component.
230231
*
231232
*
232233
* #### `restrict`

src/ngRoute/route.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ function $RouteProvider() {
7373
* - `controller` – `{(string|function()=}` – Controller fn that should be associated with
7474
* newly created scope or the name of a {@link angular.Module#controller registered
7575
* controller} if passed as a string.
76-
* - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be
77-
* published to scope under the `controllerAs` name.
76+
* - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
77+
* If present, the controller will be published to scope under the `controllerAs` name.
7878
* - `template` – `{string=|function()=}` – html template as a string or a function that
7979
* returns an html template as a string which should be used by {@link
8080
* ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.

0 commit comments

Comments
 (0)