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