Open
Description
Hi, I have a problem with change event to new image in form.
I try reproduct a single form upload as code example.but I did not have success.
Note: controller.dropEnabled
is a parameter in controller initialize with true
.
<div class="form-group"
flow-init
flow-file-added="controller.addedFile($event, $file, $flow)"
flow-drag-enter="style={border: '5px solid green'}"
flow-drag-leave="style={}"
ng-style="controller.dropEnabled && style">
<div class="thumbnail" ng-hide="$flow.files.length">
<img ng-src="images/no-image_200x150.png" alt="No image"/>
</div>
<div class="thumbnail" ng-show="$flow.files.length">
<img flow-img="$flow.files[0]" />
<!-- or this image implementation below... -->
<img app-flow-img="$flow.files[0]" app-flow-img-change="src=$src" ng-src="<% src %>"/>
</div>
<div class="form-group">
<div class="form-group" ng-hide="$flow.files.length">
<button type="button" class="btn btn-success"
flow-btn>
Select image
</button>
<p class="form-group" style="margin-top:5%;">OR</p>
</div>
<button type="button" class="btn btn-primary" ng-show="$flow.files.length" flow-btn>
Change
</button>
<div class="form-group alert" flow-drop flow-drag-enter="class='alert-success'"
flow-drag-leave="class=''" ng-style="controller.dropEnabled && class && !!$flow.files.length"
style="text-align: center; padding: 100px 0;">
Drag And Drop your file here
</div>
</div>
References
http://flowjs.github.io/ng-flow/
Issue #37 - Binding to existing image
Metadata
Metadata
Assignees
Labels
No labels