0.9.26 → 0.9.27
This no longer works.
(html)
<script src="http://code.jquery.com/jquery-latest.js"></script>
<!-- ionic css -->
<link href="http://code.ionicframework.com/0.9.27/css/ionic.min.css" rel="stylesheet"/>
<!-- angularjs scripts -->
<script src="http://code.ionicframework.com/0.9.27/js/ionic.bundle.min.js"></script>
<input type="file" id="file" style="display:none"/>
<button class="button icon ion-filing" ng-click="openFileDialog()"> openFileDialog </ button>
(controller)
$scope.openFileDialog=function() {
$('#file').trigger("click");
}
(English studying) from Japan
1 Like
Can you explain exactly what doesn’t work and perhaps setup a demo?
You really shouldn’t have that jQuery stuff in your controller. What is supposed to have with the “click” is triggered?
Hi!
Here same. Almost same code, and now with ‘salamander’ it doesn’t work anymore.
i’m was using input=“file” to upload images to a restfull server, using ahn directive on controller.
So, .trigger() to pen upload dialog. now the click return nothig.
What the better way to do this on Angular/Ionic?
I really don’t like the ideia to use jquery with my project, but i needed
Thanks!
I’m sorry to have kept you waiting.
I’ve created a demonstration.
Please compare.
(angularjs version 1.2.12)
You can open a file dialog.
You can display the file name.
(ionic version 0.9.26)
You can open a file dialog.
It is not possible to display the file name.
(ionic version 0.9.27)
It is not possible to open a file dialog.
It is not possible to display the file name.
andy
5
Hi @nobu19711208, for your specific problem try ionic.trigger: http://codepen.io/ajoslin/pen/qwpCB
This will be documented soon.
1 Like
I was in the directive.
I worked in chrome
Thank you all!
Sayonara.
1 Like
Thanks for jumping in on this one Andy. I had to idea where to go with this.