gatekeeper services
.service('GateKeeper', function($http, constant, $rootScope, $state) {
this.validate = function() {
$http.post(constant.apiUrl + '/analytics/gateKeeper', {
token: $rootScope.token
}).success(function(response) {
if(response != 1) {
$state.go('logout');
}
}).error(function() {
console.log('errror');
});
}
});