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

Commit 06fb391

Browse files
jdai8gkalpak
authored andcommitted
docs(guide/directive): remove confusing best practice
Prior to this point, the docs do not mention returning a postLink function, and all the examples use the definition object form. So, this message is confusing to new readers who may misinterpret "returning a function" as returning the factory function mentioned in the previous section. Since this page is only a "gentle introduction" to directives, and using the definition object is a best practice, it is best to just remove the message altogether. Closes #14871
1 parent 203dd4d commit 06fb391

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

docs/content/guide/directive.ngdoc

-4
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ initialization work here. The function is invoked using
162162
{@link auto.$injector#invoke $injector.invoke} which makes it injectable just like a
163163
controller.
164164

165-
<div class="alert alert-success">
166-
**Best Practice:** Prefer using the definition object over returning a function.
167-
</div>
168-
169165

170166
We'll go over a few common examples of directives, then dive deep into the different options
171167
and compilation process.

0 commit comments

Comments
 (0)