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

Commit 756c52d

Browse files
benmccanncaitp
authored andcommitted
docs(directive): link to directive registration api function
Originally, this issue was regarding documenting `restrict: 'CM'` in the directive guide, but it was pointed out that the restrict documentation is covered in the $compile documentation. Because of this, a link was simply added to the $compile documentation. However, the wording suggests that it's actually linking to the directive registration function, in $compileProvider, so the docs will link there instead. There is a link only a paragraph below to the $compile documentation, so this does not hurt. Closes #5516
1 parent c3e1a41 commit 756c52d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/content/guide/directive.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ For example, we could fix the example above by instead writing:
174174

175175
## Creating Directives
176176

177-
First let's talk about the API for registering directives. Much like controllers, directives are
178-
registered on modules. To register a directive, you use the `module.directive` API.
179-
`module.directive` takes the
177+
First let's talk about the {@link api/ng.$compileProvider#methods_directive API for registering directives}. Much like
178+
controllers, directives are registered on modules. To register a directive, you use the
179+
`module.directive` API. `module.directive` takes the
180180
{@link guide/directive#creating-custom-directives_matching-directives normalized} directive name
181181
followed by a **factory function.** This factory function should return an object with the different
182182
options to tell `$compile` how the directive should behave when matched.

0 commit comments

Comments
 (0)