angular.module('MobileWebLogistics') .service('localCustom', function () { var self = this; //=====custom gotoCounty this.gotoCounty = function ($scope, parcelid) { if ($scope.gotoCountyDelay == 0) { $scope.gotoCountyDelay = 1; window.open(parcelid, '_blank'); } setTimeout(function () { $scope.gotoCountyDelay = 0; }, 1000); } });