Skip to content

Instantly share code, notes, and snippets.

@fragsalat
Created September 30, 2015 12:48
Show Gist options
  • Save fragsalat/8b0ce0bcb4b3adcc9cdd to your computer and use it in GitHub Desktop.
Save fragsalat/8b0ce0bcb4b3adcc9cdd to your computer and use it in GitHub Desktop.
<template>
<input type="file" accept="image/*" multiple files.bind="images"/>
</template>
import {customElement, bindable} from 'aurelia-framework';
@customElement('custom-element')
export class CustomElement {
@bindable images = [];
}
<template>
<require from="custom-element"/>
<custom-element images.bind="files"></custom-element>
<button click.delegate="save()">Speichern</button>
</template>
export class Home {
files = [];
save() {
// After selecting files this.files is still empty
console.log(files);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment