Sha256: 47ab70798f6c5d68991878614135d5d66cd709084f578b554505f4e958c937b8
Contents?: true
Size: 1.05 KB
Versions: 12
Compression:
Stored size: 1.05 KB
Contents
var myModule = angular.module('myApp', ['mobile-navigate']); myModule.run(function($route, $http, $templateCache) { angular.forEach($route.routes, function(r) { if (r.templateUrl) { $http.get(r.templateUrl, {cache: $templateCache}); } }); }); myModule.controller('MainCtrl', function($scope, $navigate) { $scope.$navigate = $navigate; }); myModule.directive('ngTap', function() { var isTouchDevice = !!("ontouchstart" in window); return function(scope, elm, attrs) { if (isTouchDevice) { var tapping = false; elm.bind('touchstart', function() { tapping = true; }); elm.bind('touchmove', function() { tapping = false; }); elm.bind('touchend', function() { tapping && scope.$apply(attrs.ngTap); }); } else { elm.bind('click', function() { scope.$apply(attrs.ngTap); }); } }; }); var native_access; $(document).ready(function () { native_access = new NativeAccess(); });
Version data entries
12 entries across 12 versions & 2 rubygems