RouteMatch
interfaz
Resultado de matchRoute: la ruta y sus parámetros ya decodificados.
ts
import type { RouteMatch } from "@meekojs/meeko/framework";Código fuente src/app/runtime/router.ts:103
Declaración #
ts
interface RouteMatch {
readonly route: RouteRecord
readonly params: Readonly<Record<string, string>>
}Ejemplo #
ts
import { matchRoute } from "@meekojs/meeko/framework";
const match = matchRoute(routes, "/users/42");
if (match) console.log(match.route.id, match.params.id); // "/users/[id]" "42"Propiedades #
params
#
readonly params: Readonly<Record<string, string>>Parámetros de la URL por nombre; un catch-all une sus segmentos con /.