I am implementing a simple grid component in angularjs. I prefer html configuration over javascript because that way view code and logic code is separated.
For example,
<my-grid>
<my-column title="Name" field"name"></column>
<my-column title="Age" field"age"></column>
</my-grid>
I have created a my-column component that requires a my-grid component. When the controller is initialized it inspects the element and calls addColumn function of my-grid.
I need to properly initialize all my-column before finally building the grid. Is there any hook after all nested controllers are initialized ($onInit function is called) ?
If not should I change my design what is the angularjs appropriate design ?
my-columncomponents inmy-grid? If yes, you could probably hide the grid initially, as long as all columns called$onInitand perform some kind of notification to the parent component.