Auto-focus Textbox while template loads

@Lomas, you can do this .

.directive('focusMe', function($timeout) {
  return {
    link: function(scope, element, attrs) {

      $timeout(function() {
        element[0].focus(); 
      });
    }
  };
}); 

Then add this to the config.xml

<preference name="KeyboardDisplayRequiresUserAction" value="false" />

6 Likes