Skip to content

Instantly share code, notes, and snippets.

@Mattnmoore
Created October 22, 2018 17:10
Show Gist options
  • Select an option

  • Save Mattnmoore/91abcf1ecd18a6bc9cdb7d78f1111906 to your computer and use it in GitHub Desktop.

Select an option

Save Mattnmoore/91abcf1ecd18a6bc9cdb7d78f1111906 to your computer and use it in GitHub Desktop.
Angular dynamic field focus management
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