Open Modal After selecting Image File from Browser

折月煮酒 提交于 2019-12-24 20:16:21

问题


I'm using angular-croppie to crop my images. the cropper is working fine but there is a problem. I want to open the cropper in The Modal. But when I click on the choose file button the modal open with the file explorer window, I want to open the modal after selecting an image from the file explorer and then show that image in the cropper. I'm using AngularJs and Jquery for this function.

CodePen link for my code is here

I've tried my best to explain this issue but if you still don't understand then click on the given link. Please don't mark this question as a duplicate because I've already searched on StackOverflow but still couldn't find the solution.


回答1:


I just added an angular $watch to the file (length) which triggered the popup instead of the file open button and it works fine.

Here is your updated codepen

codepen



来源:https://stackoverflow.com/questions/48576907/open-modal-after-selecting-image-file-from-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!