html - Angularjs - Focus Management -


for application close developed completely, requirement make focus management.

  1. the popup opened should focus on first html element
  2. on successful login, focus should point navigation links.
  3. on every route or page load, focus defined in generic way if possible.

any ideas people getting above 3 requirements done application.

for 1st one, can manually auto-focus attribute form or html element keep focus on or other generic way achieving it? also, other 2 points?

thanks in advance

you start directive , apply when needed, if understood need:

  .directive('autofocus', function() {      return {        restrict: 'a',        link: function($scope, element) {          element[0].focus();        }   }; 

html:

<input type="text" name="test" autofocus> 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -