angular.module('voteApp').factory('cardKeyService', ['$window', function($window) {
    return {
        listen: function(cb) {
            angular.element($window).unbind('message');
            angular.element($window).bind('message', function(e) {
                cb(e.data);
            });
        }
    };
}]);

angular.module('voteApp').factory('cardKeyService', ['$window', '$rootScope', function($window, $rootScope) {
    $rootScope.$on('$routeChangeStart', function() {
        angular.element($window).unbind('message');
    });

    return {
        listen: function(cb) {
            angular.element($window).bind('message', function(e) {
                cb(e.data);
            });
        }
    };
}]);

Remove card key listener on routeChangeStart
Remove card key listener on routeChangeStart
