Skip to content

Commit 1365e45

Browse files
austinoneilpetebacondarwin
authored andcommitted
docs(guide/component): clarify when to use directives instead of components
Clarify that components cannot be used to perform actions in compile and prelink functions. Closes angular#15042 PR (angular#15100)
1 parent 652f628 commit 1365e45

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/content/guide/component.ngdoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ Advantages of Components:
1919

2020
When not to use Components:
2121

22-
- for directives that rely on DOM manipulation, adding event listeners etc, because the compile
23-
and link functions are unavailable
22+
- for directives that need to perform actions in compile and pre-link functions, because they aren't available
2423
- when you need advanced directive definition options like priority, terminal, multi-element
2524
- when you want a directive that is triggered by an attribute or CSS class, rather than an element
2625

0 commit comments

Comments
 (0)