https://github.com/dominicbachmann/angular-typed-router
https://github.com/dominicbachmann/angular-typed-router
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dominicbachmann/angular-typed-router
- Owner: dominicbachmann
- License: mit
- Created: 2025-10-02T05:35:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-07-03T10:02:30.000Z (28 days ago)
- Last Synced: 2026-07-03T12:08:21.946Z (28 days ago)
- Language: TypeScript
- Size: 936 KB
- Stars: 15
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular - angular-typed-router - Type‑safe Angular navigation from a single Routes array, yielding inferred path unions and typed navigate tuples with zero codegen or runtime cost. (Third Party Components / Router)
- fucking-awesome-angular - angular-typed-router - Type‑safe Angular navigation from a single Routes array, yielding inferred path unions and typed navigate tuples with zero codegen or runtime cost. (Third Party Components / Router)
README
# Angular Typed Router
Type-safe navigation for Angular. One source of truth (your `Routes` array) → inferred `Path` union + strongly typed `navigate` command tuples. No codegen, no runtime cost, just TypeScript. ✨
## Why
- ✅ Catch broken / misspelled route paths at compile time
- 🛠️ Refactors become safer (remove a route → instant red squiggles)
- ⚡ Zero runtime weight (pure types)
- 🔁 Works exactly the same as Angular Router except you now import `TypedRouter` instead of `Router` and use `TypedRouterLink` instead of `RouterLink` (and you get type safety)
- 🔌 Drop-in: keep your existing routing setup
## Features
- 📍 `Path` – union of every concrete reachable URL
- 🧩 `Commands` – typed tuples for `router.navigate([...])`
- 💡 Get auto-completion for paths and commands
- 🚀 `TypedRouter` – typed `navigate` / `navigateByUrl` / `createUrlTree`
- 🔗 `TypedRouterLink` – typed `[routerLink]` in templates
- 🪄 It's all zero-runtime-weight types and interfaces, no code generation, no decorators, no custom builders
## Installation 📦
Installation guide: [libs/typed-router/README.md](./libs/typed-router/README.md).