-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Closed
Copy link
Labels
freq1: lowhelp wantedAn issue that is suitable for a community contributor (based on its complexity/scope).An issue that is suitable for a community contributor (based on its complexity/scope).
Description
I'm submitting a ... Hard to say....
Current behavior
- ngAfterContentInit
- ngAfterContentChecked
- ngAfterViewInit
- ngAfterViewChecked
Fire on directives.
Expected/desired behavior
According to the docs these lifecycle hooks are Components only
- ngAfterContentInit
- ngAfterContentChecked
- ngAfterViewInit
- ngAfterViewChecked
The compiler registers them to invoke on directives as well.
The view factory of a component containing a directive will invoke the lifecycle hook on that directive. This is not by change, this is by intent from the compiler as it requires accessing the directive instance and calling the hook within the detectChangesInternal method.
Here's a plunker
I can only assume the docs are incorrect...
cebor, kmolerov, nicolashenry and leviathanbadger
Metadata
Metadata
Assignees
Labels
freq1: lowhelp wantedAn issue that is suitable for a community contributor (based on its complexity/scope).An issue that is suitable for a community contributor (based on its complexity/scope).