I'we read some posts about using ng-switch or directive when changing and input type. I now have this code but it is very repetitive.
<input ng-change="change();" ng-if="! item.data && item.mapping == 'password'"
type="password" class="login-input" id="{{item.mapping}}"
ng-model="item.content" placeholder="{{item.name | mandatory:this.item.minLength }}"
ng-minlength="{{item.minLength}}">
<input ng-change="change();" ng-if="! item.data && item.mapping != 'password'"
type="text" class="login-input" id="{{item.mapping}}" ng-model="item.content"
placeholder="{{item.name | mandatory:this.item.minLength }}"
ng-minlength="{{item.minLength}}">
I only want to change the type. How can I make this less DRY with angular? How to use directives when changing the type?