Skip to content

feat(routes): parse and display redirectTo, title, and route metadata in Route Inspector #9

Closed

Description

@Kaap10

Summary

In Angular applications, routes frequently include redirections (redirectTo: 'home', pathMatch: 'full') and route page titles (title: 'Home').

Currently, packages/ng-devtools/src/rpc/get-routes.ts only extracts path, component, and hasChildren. Redirection routes show as having no component (—), making them look like empty or broken routes in both the DevTools UI and the MCP ng-devtools:get-routes agent tool.

Proposed Solution

  1. Extend RouteSchema in packages/ng-devtools/src/rpc/get-routes.ts:
    • Add optional fields: redirectTo?: string, title?: string.
  2. Extract Properties:
    • Parse redirectTo and title literals in findRouteFiles().
  3. Route Inspector UI:
    • Display redirect targets (e.g. ➜ /dashboard) and page titles in app/src/pages/route-inspector.ts.
  4. Tests:
    • Add test cases in packages/ng-devtools/src/rpc/__tests__/get-routes.test.ts.

Affected Files

  • packages/ng-devtools/src/rpc/get-routes.ts
  • app/src/pages/route-inspector.ts
  • packages/ng-devtools/src/rpc/__tests__/get-routes.test.ts

Activity

  1. Kaap10 commented on Sep 23, 2026

    @Kaap10
    ContributorAuthor

    Hi @santoshyadavdev , I noticed this while exploring the codebase. Since Angular 19/22 heavily relies on httpResource and rxResource, having them tracked in DevTools would be really useful.

    I’d love to take this up and submit a PR with the fix and test cases. Let me know what you think!

  2. santoshyadavdev commented on Sep 23, 2026

    @santoshyadavdev
    Collaborator

    Go for it 💙

  3. Kaap10 commented on Sep 23, 2026

    @Kaap10
    ContributorAuthor

    Submitted the fix and test cases in PR #10, ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions