Skip to content

Commit 51a7f9d

Browse files
roylingcaitp
authored andcommitted
docs(guide/directive): rephrase for consistency
- referring to `=attr` rather than `=prop` is consistent with note under example with =customerInfo - change `prop` to `attr` (basically `prop` refers to property in JS object, `attr` is for HTML tag) - change the function name in description to match the name in code example Closes angular#5786
1 parent 61eb426 commit 51a7f9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/content/guide/directive.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -734,13 +734,13 @@ own behavior to it.
734734
We want to run the function we pass by invoking it from the directive's scope, but have it run
735735
in the context of the scope where its registered.
736736

737-
We saw earlier how to use `=prop` in the `scope` option, but in the above example, we're using
738-
`&prop` instead. `&` bindings expose a function to an isolated scope allowing the isolated scope
737+
We saw earlier how to use `=attr` in the `scope` option, but in the above example, we're using
738+
`&attr` instead. `&` bindings expose a function to an isolated scope allowing the isolated scope
739739
to invoke it, but maintaining the original scope of the function. So when a user clicks the
740-
`x` in the dialog, it runs `Ctrl`'s `close` function.
740+
`x` in the dialog, it runs `Ctrl`'s `hideDialog` function.
741741

742742
<div class="alert alert-success">
743-
**Best Practice:** use `&prop` in the `scope` option when you want your directive
743+
**Best Practice:** use `&attr` in the `scope` option when you want your directive
744744
to expose an API for binding to behaviors.
745745
</div>
746746

0 commit comments

Comments
 (0)