---
url: https://lit-ui-router.dev/v1/reference/lit-ui-router/core/getScopedRouter.md
---
[lit-ui-router](../index.md) / getScopedRouter

# Variable: getScopedRouter

```ts
const getScopedRouter: () => 
  | UIRouter
  | undefined;
```

Defined in: packages/lit-ui-router/src/context.ts:518

Returns the router the innermost enclosing
[\`withRouterSync\`](withRouterSync.md) call scoped, or `undefined`
outside one.

## Returns

| [`UIRouter`](https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html)
| `undefined`
