RouteParams no angularjs

1

I'm using RouteParams in AngularJs

$routeProvider.when("/ReciboPagamentoCorretor/:NUMERO_RECIBO", {
    templateUrl: "view/ReciboPagamentoCorretor.html",
    controller: "ReciboPagamentoCorretorController"
})

but at the time of rootScope

 $http.get(config.BaseUrl + "/auth.php").success(function(inf) {
     if (typeof inf == "object") {
         if (inf.nivel == 1 && $location.path() != "/ContratosCorretor" &&
         $location.path() != "/NovoContratoCorretor" &&
         $location.path()!= "/PagamentosCorretor" &&
         $location.path() != "/ReciboPagamentoCorretor" &&
         $location.path() != "/ContratosPendentesCorretor") {
             $location.path("/ContratosCorretor")
         }
    }
})

It says location.path() != "/ReciboPagamentoCorretor" is true and will not let me access page /ReciboPagamentoCorretor

    
asked by anonymous 14.01.2016 / 04:01

0 answers