javascript - Setting input type="file" using AngularJS expression not working in Chrome -
i working on form builder application in angular , have run odd bug in chrome. dynamically setting form input type based on variable. seems work input types except "file", change "text" in chrome. simple example below:
<div ng-app="app"> <input type="{{'file'}}" /><br /> <input type="{{'color'}}" /><br /> <input type="{{'button'}}" value="button" /> </div>
indeed, sounds bug, can bypass using ngattr
:
<input ng-attr-type="{{'file'}}" /> <input ng-attr-type="{{'color'}}" /> <input ng-attr-type="{{'button'}}" value="button" />
Comments
Post a Comment