Whenver I have an Angular expression as a value to input\'s type, it won\'t work:
You cannot change the input type dynamically in any browser and so it is not possible to use dynamic single input statement. You are left with using conditional statement for creation of elements where type is hard-coded.
Use ng-switch on directive where you can compare the type and create elements based on the condition match. For example:
In this example you are instructing angular script to compare elem.eleType using ng-switch on in second div against actual type i.e, text, password and email in the input tag (compared using ng-switch-when, and only that input element is create where the condition matches, rest will be ignored.