Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 在Ionic中未接收触摸事件数据_Angularjs_Ionic Framework_Touch_Dom Events - Fatal编程技术网

Angularjs 在Ionic中未接收触摸事件数据

Angularjs 在Ionic中未接收触摸事件数据,angularjs,ionic-framework,touch,dom-events,Angularjs,Ionic Framework,Touch,Dom Events,我正在尝试使用Ionic框架做一些相当简单的事情 <form> <div class="list"> <div> <img ng-src="some_image_source"></img> </div> <label class="item item-input"> <input type="text" placeholder="What do you need to do

我正在尝试使用Ionic框架做一些相当简单的事情

<form>
<div class="list">
  <div>
    <img ng-src="some_image_source"></img>  
  </div>
  <label class="item item-input">
    <input type="text" placeholder="What do you need to do?" ng-model="task.title">
  </label>
</div>
<div class="padding">
  <button on-touch="beginInterest(event)" class="button button-block button-positive">Create Task</button>
</div>

我在这里做错了什么吗?

您需要删除
type=“submit”

创建任务

我认为您需要执行
ng touch=“beginInterest($event)”
并且需要加载
angular touch.js
并在应用程序依赖项上设置
ngTouch
(例如
angular.module('myApp',['ngTouch'])
。此处的文档:

不幸的是,这没有帮助。我已经更新了上面表单的html。如果您有其他信息,请告诉我。我希望通过Ionic的on touch指令实现这一点。
  $scope.beginInterest = function (event) {
    // But there is no event object here! It's undefined.

  }
<button on-touch="beginInterest()" class="button button-block button-positive">Create Task</button>