Skip to content

Instantly share code, notes, and snippets.

@felippenardi
Forked from travisjeffery/angular-focus.html
Created April 12, 2013 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felippenardi/5374277 to your computer and use it in GitHub Desktop.
Save felippenardi/5374277 to your computer and use it in GitHub Desktop.
<script>
angular.directive('tj:focus', function(){
return function(scope, element){
element[0].focus();
};
});
</script>
<div>
<input type="text" ng:model="model" tj:focus />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment