Created
October 22, 2018 17:10
-
-
Save Mattnmoore/91abcf1ecd18a6bc9cdb7d78f1111906 to your computer and use it in GitHub Desktop.
Angular dynamic field focus management
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public deleteEmail(index) { | |
| // remove email field | |
| // set focus | |
| document.getElementById('emails-' + (index - 1)).focus(); | |
| } | |
| public removeAllExternalEmails() { | |
| // remove all emails and hide container | |
| // set focus | |
| document.getElementById('show-external-emails').focus(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment