That's great for html5 browsers. But what about when you want to select an input's text and that text doesn't get added until after an ajax call? Here's a directive I created as one approach:
.directive('selectOnPageLoad',function($timeout){
return {
link: function(scope,element){
//wait until intial value is there, then select it, then clear the watch so doesn't keep doing it
var clearWatch = scope.$watch(
function(){ return $(element[0]).val(); },
function(value){
if (value){
element[0].select();
clearWatch();
}
}
)
}
}
})