You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
http://caniuse.com/#feat=autofocus tells the browser to focus an element on page load. It would be great if Angular had support for this built-in, so that it also works on browsers that don't support it and when creating elements dynamically, like in forms.
As an example, here's a directive that does this: https://gist.github.com/mlynch/dd407b93ed288d499778
Perhaps this can be used as-is, or it might need adapting for the case where many elements with the autofocus attribute get created at once (per the spec only one such element should exist per doc but hey).