Created
September 30, 2015 12:48
-
-
Save fragsalat/8b0ce0bcb4b3adcc9cdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<input type="file" accept="image/*" multiple files.bind="images"/> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {customElement, bindable} from 'aurelia-framework'; | |
@customElement('custom-element') | |
export class CustomElement { | |
@bindable images = []; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="custom-element"/> | |
<custom-element images.bind="files"></custom-element> | |
<button click.delegate="save()">Speichern</button> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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