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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -