[DOCS]: document using routeMeta to redirect to a default path

This issue has been tracked since 2023-02-17.

Intended PR after '## Route Metadata' section and code

Redirect to a default route

To redirect to the route /dashboard from /, define redirectTo and pathMatch inside src/app/routes/index.ts:

import { RouteMeta } from '@analogjs/router';

export const routeMeta: RouteMeta = {
  redirectTo: '/dashboard',
  pathMatch: 'full',

Or is there a preference to keep using parenthesis index route like src/app/routes/(redirect).ts?

brandonroberts wrote this answer on 2023-02-17

Interesting convention around the (redirect).ts. I think the index.ts would be clearer, as you don't have to name it (redirect) for it to work

More Details About Repo
Owner Name analogjs
Repo Name analog
Full Name analogjs/analog
Language TypeScript
Created Date 2022-07-06
Updated Date 2023-03-28
Star Count 885
Watcher Count 18
Fork Count 67
Issue Count 33


Issue Title Created Date Updated Date