There's any event onLocationUnavailable?

there’s any event onLocationUnavailable?

I mean some listener or something like that, wich every time you deny access to your location, a mine function is triggered. I do not want to do it in an interval or setTimeout

i used this, but i don’t like it:

    $scope.controlDiagnostic = function () {
         cordova.plugins.diagnostic.isLocationAvailable(function (enabled) {
            if (enabled) {
                 $scope.tieneConexion = true;
                $scope.$digest();
        }
        else {
            $scope.tieneConexion = false;
            alert("Active el acceso a su ubicacion");

            $scope.$digest();

            cordova.plugins.diagnostic.switchToLocationSettings();
        }
    }, function () {
        console.log("error");

    });

};