html - Angularjs - Focus Management -
for application close developed completely, requirement make focus management.
- the popup opened should focus on first html element
- on successful login, focus should point navigation links.
- 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
Post a Comment