I have component in component in component. So in the root component i want to focus input in the deepest child when i am clicking somewhere in .grandparent-container.
As you can see in the example i could have multiple components on the page. So i need to focus only child input of the clicked component. Here is example.
I tried to create a [focus] directive, but it works only if i have one grandparent on the page, because directive can't to figure out what exactly input it should focus.
Select element by id is not the case also.
How can i achieve this?