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...
I'm submitting a ... Hard to say....
Current behavior
Fire on directives.
Expected/desired behavior
According to the docs these lifecycle hooks are Components only
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
detectChangesInternalmethod.Here's a plunker
I can only assume the docs are incorrect...