The angular documentation has the following information regarding components
Components have a well-defined lifecycle Each component can implement "lifecycle hooks". These are methods that will be called at certain points in the life of the component. The following hook methods can be implemented: $onInit() - $onChanges(changesObj) $onDestroy() $postLink()
https://docs.angularjs.org/guide/component
I have tried different ways to implement them, listening to them, but I can't seem to get it working, I tried different things, like passing a function as argument or assigning a function, tried using $scope, $on and this to no avail. I tried reading the angular source code and there's very little information about it. On this file, compile.js on line 3202 it looks like to use them the right way to do it is to assign a function to it.
Any information is appreciated.