stormpath / stormpath-sdk-angularjs

User Management for AngularJS (1.x) applications
http://docs.stormpath.com/angularjs/sdk/
Apache License 2.0
165 stars 58 forks source link

Add focus to fields in login, registration and forgot password forms #184

Open mraible opened 7 years ago

mraible commented 7 years ago

This is pretty easy to do with Angular's $timeout service. For example:

$timeout(function (){angular.element('#sp-login').focus();});
robertjd commented 7 years ago

It seems like we should just do this in the link function for the login directive, that way we can reference the element by the local field ID, and not a global element ID.