Reputation: 1912
I use Phonegap 3.0 and AngularJS 1.1.5.
I want to remove the 300ms delay on touch devices. Therefore I integrated angular-mobile (see v1.1.5 angular-mobile.js). In my app.js I have
var myApp = angular.module('myApp', ['ajoslin.mobile-navigate', 'ngMobile'])
.config(function ($compileProvider) {
$compileProvider.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
})
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/', {templateUrl: 'partials/homeView.html', controller: 'HomeCtrl'});
$routeProvider.otherwise({redirectTo: '/'});
}]);
In my partial:
<a ng-click="showTime()" >Alert</a>
My Controller:
function HomeCtrl($scope, $rootScope, $navigate) {
$scope.showTime = function () {
console.log(Date.now());
};
}
The text is printed, but you see that it is delayed by the 300ms because it does not appear right now in the log.
Can anyone help me with that?
Maybe I'm doing something really wrong ;-)
THanks!
Upvotes: 0
Views: 1970
Reputation: 1912
I switched to AngularJS 1.2 and am using the ngTouch directive from the angular code their! That works!
Upvotes: 1