以下を考えると:
<html ng-app>
...
<script>
function Main($scope){
$scope.checked = function() {
alert("This will never show!");
};
}
</script>
<body>
<div data-role="page" ng-controller="Main">
<div data-role="header">
<h1>Sample</h1>
</div>
<div data-role="content">
<label for="mybox">Click here!</label>
<input id="mybox" type="checkbox" ng-model="boxval" ng-change="checked()">
</div>
</div>
</body>
</html>
ボックスをオンまたはオフにしても、メソッド呼び出しはトリガーされません。<label>
タグを外すと正常に動作します。
JQuery Mobile が基礎となるタグの巧妙な操作を行っていることは知ってい<input type="checkbox">
ますが、それをだまして ng-change を有効にする簡単な方法はありますか?