Open Modal After selecting Image File from Browser


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 <a href="https://codepen.io/Zaraa/pen/RQWKbw" rel="nofollow">here</a>

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.


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

<a href="https://codepen.io/declanmcd/pen/OQMRzv?editors=1010" rel="nofollow">codepen</a>


  • angular Scroll div on button click
  • Getting webGL error in autodesk viewer
  • Listen to the 'change' even of an element in the shadow DOM
  • Notepad++ - delete all lines with certain text
  • How to re-render views using Angular JS
  • jQueryUI dialog replacement for confirm?
  • CSS: How to fix overlapping divs
  • How to remove left and right margins from all wrapped rows in flexbox (without nth-child or js)
  • Unable to run SDL program in Eclipse but able to do so in Windows Explorer
  • How to remove all of a jQuery UI dialog when it is closed
  • change color of jstree node
  • How can I make this modal persistent?
  • SyntaxError: (irb):26: both block arg and actual block given
  • How do I display a dialog that asks the user multi-choice questıon using tkInter?
  • ViewController With Transparent Background Entering Current ViewController With Push Transition
  • Problem while Building a Setup Project for a windows Service?
  • Alert pop up with LWUIT
  • Android fill_parent issue
  • Scrapy recursive link crawler
  • How to rebase a series of branches?
  • Disabling Alt-F4 on a Win Forms NotifyIcon
  • Why ng-show works with ng-repeat but ng-if doesn't? [duplicate]
  • Sony Xperia Z Tablet not found by adb
  • Check if a string to interpolate provides expected placeholders
  • javascript inside java/jsp code
  • Sending data from AppleScript to FileMaker records
  • jquery mobile loadPage not working
  • jQuery tmpl and DataLink beta
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • Why winpcap requires both .lib and .dll to run?
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • How to disable jQuery.jplayer autoplay?
  • KeystoneJS: Relationships in Admin UI not updating
  • AngularJs get employee from factory
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • CSS Applying specific rule for a specific monitor resolution with only CSS is posible?
  • coudnt use logback because of log4j
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Setting background image for body element in xhtml (for different monitors and resolutions)