¿Cómo puedo redirigir o actualizar la URL? No puedo encontrar ninguna buena documentación sobre esto. Básicamente, lo que quiero hacer es cambiar dinámicamente los $ routeParams y actualizar la URL con el nuevo valor.
Mi código es el siguiente:
if ($routeParams.time) {
var url;
$routeParams.time = encodeURIComponent(value);
url = '/' + $routeParams.time + '/' + 'marketing/networks';
$location.path(url);
} else {
$routeParams.time = encodeURIComponent(value);
url = '/' + $routeParams.time + $location.path();
$location.path(url);
}
https://stackoverflow.com/questions/13636476/angularjs-best-way-to-update-route-parameter –