According to the docs the AfterContentChecked
lifecycle hook is triggered:
after Angular checks the content projected into the component
What does "Angular checks" in the documentation mean, exactly?
A callback method that is invoked immediately after the default change detector has completed checking all of the directive's content.
When should you use ngAfterViewChecked? ngAfterViewChecked is useful when you want to call a lifecycle hook after all child components have been initialized and checked.
This method is called only once during the component lifecycle, after the first ngOnChanges call. ngOnInit() is still called even when ngOnChanges() is not, which is the case when there are no template-bound inputs. This is one of the most used lifecycle hooks in Angular.
Angular calls lifecycle hook methods on directives and components as it creates, changes, and destroys them. A component has a lifecycle managed by Angular. Angular creates it, renders it, creates and renders its children, checks it when its data-bound properties change, and destroys it before removing it from the DOM.
AfterContentChecked, component-only hook, is called after Angular checks the content projected into the component (it's data-bound properties).
When does Angular check the projected content?
AfterContentInit
hook finishes.What causes the application state change?
See also: Angular change detection explained.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With