Implementing "input's type property CAN be changed"

This directive enables to write an input tag with a variable type property like:

     <input type="{{model}}" ui-input2 />

You can not write the following code without this directive:

    <input type="{{model}}" />

because jQuery throws an error: "type property can't be changed" when an type property is dynamically changed.
This is due to an IE problem: http://stackoverflow.com/questions/1544317/jquery-change-type-of-input-field