All, I am looking a generic way to implement ngAfterViewInit
method for all the components in a big web application.
The reason is we need to track each page's loading time, so in order to do this, I need to put checking solution into ngAfterViewInit
method for the components to be checked.
The problem is there are too many components and too many pages, if I use either abstract class or put logic directly into the method, I have to touch all the components and update one by one, this is not generic at all.
So I am wondering if there are some generic solutions to add logic in just one place and being called by all the components automatically.