title: How can I trigger the click event of another element in ng-click using angularjs?
body: <p>I'm trying to trigger the click event of the <code>&lt;input type="file"&gt;</code> element from the <code>button</code>.</p>
  
  <pre><code>&lt;input id="upload"
      type="file"
      ng-file-select="onFileSelect($files)"
      style="display: none;"&gt;
  
  &lt;button type="button"
      ng-click="angular.element('#upload').trigger('click');"&gt;Upload&lt;/button&gt;
  </code></pre>
  
  <p>It's common practice to hide the uglified beast known as <code>&lt;input type=file&gt;</code> and trigger it's click event by some other means.</p>