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

docs(guide/component) correct usage recommendations #15042

Closed
zuzusik opened this issue Aug 18, 2016 · 1 comment
Closed

docs(guide/component) correct usage recommendations #15042

zuzusik opened this issue Aug 18, 2016 · 1 comment

Comments

@zuzusik
Copy link
Contributor

zuzusik commented Aug 18, 2016

Currently in section When not to use Components it is said:

  • for directives that rely on DOM manipulation, adding event listeners etc, because the compile
    and link functions are unavailable

But there is a $postLink hook which is described in the same document as follows:

  • $postLink() - Called after this controller's element and its children have been linked. Similar to the post-link
    function this hook can be used to set up DOM event handlers and do direct DOM manipulation.

I assume text from the first quote should be changed to something like

  • for directives that need to perform actions in compile and pre-link functions, because they aren't available

Thoughts?

@gkalpak
Copy link
Member

gkalpak commented Aug 18, 2016

Sounds reasonable. The initial guide was written before lifecycle hooks (such as $postLink) were implemented.

@gkalpak gkalpak added this to the Backlog milestone Aug 18, 2016
@Narretz Narretz closed this as completed in c729554 Sep 8, 2016
Narretz pushed a commit that referenced this issue Sep 8, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes #15042
PR (#15100)
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Nov 21, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes angular#15042
PR (angular#15100)
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Nov 21, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes angular#15042
PR (angular#15100)
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Nov 21, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes angular#15042
PR (angular#15100)
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Nov 21, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes angular#15042
PR (angular#15100)
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Nov 21, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes angular#15042
PR (angular#15100)
petebacondarwin pushed a commit that referenced this issue Nov 23, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes #15042
PR (#15100)
petebacondarwin pushed a commit that referenced this issue Nov 24, 2016
…onents

Clarify that components cannot be used to perform actions in compile
and prelink functions.

Closes #15042
PR (#15100)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants