문제

How can we make the following work when we set the input type to file? Here is a fiddle too.

<div ng-app>
    <input ng-model="type" type="radio" value="email" />Email
    <input ng-model="type" type="radio" value="password" />Password
    <input ng-model="type" type="radio" value="file" />File<br/>
        <label>Type:</label> {{ type }}<br/>
    <input type="{{ type }}">
</div>

We can switch dynamically between password, email, and text input types but not into a file type.

We have also tried to set the input type to file from a directive. That also doesn't work.

There is probably a time in the DOM rendering lifecycle after which we can no longer set an input type to file. Can angular set the input type to file before it's to late?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top