Conditional “multiple” attribute in <input type=“file”> with AngularJS

前端 未结 8 2233
感情败类
感情败类 2021-01-11 18:02

I need an upload form field that may or may not allow the user to select more than one file.

I know I can do something like:



        
8条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 18:31

    I come to this page for same issue with Angular 2

    And finally fixed like this:

    
    

    Note: both file type (extAccepts) and maxFiles are reading from component as @input() from the user.

    Hope it will help for someone!

提交回复
热议问题