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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -