This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 150150 *
151151 * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.
152152 *
153- * * **`true`:** A new scope will be created for the directive's element. If multiple directives on the
154- * same element request a new scope, only one new scope is created. The new scope rule does not apply
155- * for the root of the template since the root of the template always gets a new scope.
153+ * * **`true`:** A new child scope that prototypically inherits from its parent will be created for
154+ * the directive's element. If multiple directives on the same element request a new scope,
155+ * only one new scope is created. The new scope rule does not apply for the root of the template
156+ * since the root of the template always gets a new scope.
156157 *
157158 * * **`{...}` (an object hash):** A new "isolate" scope is created for the directive's element. The
158159 * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent
257258 *
258259 * #### `controllerAs`
259260 * Identifier name for a reference to the controller in the directive's scope.
260- * This allows the controller to be referenced from the directive template. The directive
261- * needs to define a scope for this configuration to be used. Useful in the case when
262- * directive is used as component.
261+ * This allows the controller to be referenced from the directive template. This is especially
262+ * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible
263+ * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the
264+ * `controllerAs` reference might overwrite a property that already exists on the parent scope.
263265 *
264266 *
265267 * #### `restrict`
You can’t perform that action at this time.
0 commit comments