I'm searching for a angular-way to attach a global focus event to all input fields that appear on my site, and will appear in the future. With jQuery, I would have used the live
method, and simply put the event handler in the index.html.
I need to listen to the focus
and blur
event, because of a bug when the virtual keyboard on iOS 7 in mobile Safari appears. After I received the event, I have to re-position a navigation bar at the bottom (see here for the bug iOS 5 fixed positioning and virtual keyboard).
So, what is the best Angular-way to achieve this, without injecting something into controllers all the time? Is there a "global-way"?