Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jade/Other Compiled templating language can cause issue with ng-file-change #616

Closed
SimeonC opened this issue Mar 11, 2015 · 1 comment
Closed

Comments

@SimeonC
Copy link

SimeonC commented Mar 11, 2015

This is mostly an FYI for anyone else who has problems with this. I defined my file upload like so:

.list-group-item(
    ng-file-drop
    ng-file-select
    ng-model="upload.files"
    ng-file-change="startUpload($files, upload)"
) {{upload.name}}

Unfortunately this causes issues as this compiles to:

<div class="list-group-item"
    ng-file-drop="ng-file-drop"
    ng-file-select="ng-file-drop"
    ng-model="upload.files"
    ng-file-change="startUpload($files, upload)"
>{{upload.name}}</div>

This causes issues as ng-file-drop and ng-file-select attribute values try to override the ng-file-change if both are defined which makes it seem like the change event doesn't fire (I may have missed this documented somewhere).

The workaround for this is to make the attributes blank like so:

.list-group-item(
    ng-file-drop=""
    ng-file-select=""
    ng-model="upload.files"
    ng-file-change="startUpload($files, upload)"
) {{upload.name}}

I can get this to work that way but I thought it best to mention this as I couldn't find any docs anywhere about this quirk.

danialfarid pushed a commit that referenced this issue Apr 13, 2015
…and some IE8-9 bugs and styling issue
@danialfarid
Copy link
Owner

Fixed in version 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants