I find it difficult to remove jQuery from our application. Main problem: simple link combining ng-clickwith ui-sref:
<a data-ui-sref="main2" data-ng-click="reportClick()">Link</a>
Result: ng-clickfires, ui-srefno. This only happens when using angular-touch without jQuery as a dependency and a mobile browser, or emulating a mobile device in the new Chrome 32 (I used Nexus 4 as the target for emulation).
Example: http://jsfiddle.net/scheffield/AEfMm/
To see the effect: http://jsfiddle.net/scheffield/AEfMm/show in a mobile browser
I already did a little research and found out that the event object is broken:
element.bind("click", function(e) {
var button = e.which || e.button;
if ((button === 0 || button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
$timeout(function() {
scope.$apply(function() {
$state.go(ref.state, params, { relative: base });
});
});
e.preventDefault();
}
});
, , angular.noop.
?