1

In my directive, I'm trying to use the input file lumx but get the following error:

<div flex-item>
    <lx-file-input label="Browse..." id="files" ng-model="file"></lx-file-input>
</div>

Error: [$compile:nonassign] Expression 'undefined' used with directive 'lxFileInput' is non-assignable! http://errors.angularjs.org/1.3.15/$compile/nonassign?p0=undefined&p1=lxFileInput

Also, in the official documentation for lumx (http://ui.lumapps.com/directives/file-inputs), if you check in the console log, you'll see the same error.

How can I fix this?

Dhanuka
  • 2,826
  • 5
  • 27
  • 38
Léon Jiresse
  • 621
  • 9
  • 18

1 Answers1

0

I found the reason, if someone encounter the same issue. It must need value attribute, like this:

<lx-file-input label="Browse..." value="file" id="files" ng-model="file"></lx-file-input>
Léon Jiresse
  • 621
  • 9
  • 18