ng-route-discoverer
ng-route-discoverer
traverses an Angular project and discovers all routes, including lazy routes (loadChildren
).
Installation
npm install --save-dev ng-route-discoverer
or yarn add --dev ng-route-discoverer
Usage
CLI
ng-route-discoverer --project ./path/to/tsconfig.app.json
Sample output:
/
/app-shell
/errors/not-found
/errors/internal-server-error
/feature
/feature/feature-page
/**
API
import { getPaths, getProjectRoutes } from 'ng-route-discoverer';
const routes = getProjectRoutes('./src/tsconfig.app.json'); // tree
const paths = getPaths(routes);