AngularJS: ng-click in directive not firing on mobile

不羁岁月 提交于 2019-12-10 22:25:41

问题


i'm currently struggling with the ng-click in AngularJS.

I have a directive and inside an element with and ng-click-command.

<div class="james-upload-wrapper row">
<div class="james-upload-image" ng-show="room.image">
    <img src="{{room.image}}" />
</div>
<div class="james-upload-title twelve columns" ng-init="form.showInput=false;">
    <div class="ten columns">
        <span class="james-upload-title" ng-hide="form.showInput">{{room.name}}</span>
        <input class="text input" ng-model="room.name" ng-show="form.showInput" />
    </div>
    <div class="two columns">
        <a class="james-upload-button james-icon-pencil" ng-click="form.showInput = !form.showInput"></a>
        <a class="james-upload-button james-icon-upload" ng-click="openFileUpload()"></a>
    </div>
</div>

If I click that with normal Chrome window, everything works great. If I emulate a Nexus 7 view with Developer Tools, nothing happens. I'm using AngularJS 1.2.16 with jQuery 1.11.1.

I included ngTouchin my app dependencies, but it doesn't work, wether I include it or not...

I hope you guys have some ideas.

Regards

来源:https://stackoverflow.com/questions/24701933/angularjs-ng-click-in-directive-not-firing-on-mobile

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