A slight addition is to also name your directive "placeholder" so there will be no code changes to the html:
.directive( 'placeholder', ['$timeout', function ( $timeout ) {
if ( Modernizr.input.placeholder === true ) return {};
return {
link : function ( scope, elm, attrs ) {
if ( attrs.type === 'password' ) return;
$timeout( function () {
$( elm ).val( attrs.placeholder ).focus(function () {
if ( $( this ).val() == $( this ).attr( 'placeholder' ) ) {
$( this ).val( '' );
}
} ).blur( function () {
if ( $( this ).val() == '' ) {
$( this ).val( $( this ).attr( 'placeholder' ) );
}
} );
} );
}
};
} ] )