Repository navigation
Closed
Description
Overview of the issue
If there are enums in the routes definition, compodoc throws an error:
Routes parsing error, maybe a trailing comma or an external variable, trying to fix that later after sources scanning.
Operating System, Node.js, npm, compodoc version(s)
Windows 11
Npm version: 9.6.6
Compodoc version: 1.1.19
TypeScript version used by Compodoc : 4.5.5
TypeScript version of current project : 4.8.4
Node.js version : v18.10.0
"@angular/animations": "15.0.1",
"@angular/common": "15.0.1",
"@angular/compiler": "15.0.1",
"@angular/core": "15.0.1",
"@angular/forms": "15.0.1",
"@angular/platform-browser": "15.0.1",
"@angular/platform-browser-dynamic": "15.0.1",
"@angular/router": "15.0.1",
"keycloak-angular": "13.0.0",
"keycloak-js": "20.0.3",
"primeicons": "6.0.1",
"primeng": "15.0.0-rc.1",
"rxjs": "7.5.0",
"tslib": "2.3.0",
"zone.js": "0.11.4"
Angular configuration, a package.json file in the root folder
{
"name": "project-name",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start:dev": "ng serve --poll 500",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"compodoc": "npx compodoc -p tsconfig.doc.json"
},
"private": true,
"dependencies": {
"@angular/animations": "15.0.1",
"@angular/common": "15.0.1",
"@angular/compiler": "15.0.1",
"@angular/core": "15.0.1",
"@angular/forms": "15.0.1",
"@angular/platform-browser": "15.0.1",
"@angular/platform-browser-dynamic": "15.0.1",
"@angular/router": "15.0.1",
"keycloak-angular": "13.0.0",
"keycloak-js": "20.0.3",
"primeicons": "6.0.1",
"primeng": "15.0.0-rc.1",
"rxjs": "7.5.0",
"tslib": "2.3.0",
"zone.js": "0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.0.1",
"@angular/cli": "15.0.1",
"@angular/compiler-cli": "15.0.1",
"@types/jasmine": "4.0.0",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.41.0",
"eslint": "8.28.0",
"eslint-config-standard-with-typescript": "23.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-n": "15.5.1",
"eslint-plugin-promise": "6.1.1",
"jasmine-core": "4.3.0",
"karma": "6.4.0",
"karma-chrome-launcher": "3.1.0",
"karma-coverage": "2.2.0",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.0.0",
"typescript": "4.8.4"
}
}
Compodoc installed globally or locally ?
Globally
Motivation for or Use Case
Im working on a project where need an effective implementation lazy feature modules and compodoc helps to illustrate how the routes are builded. Also I use good practices like enums on my team projects.
Reproduce the error
Route definition:
const routes: Routes = [
{ path: '', component: MyComponent, outlet: MyRoutes.RouteFor }
]
Enum definition:
export enum MyRoutes {
RouteOne= 'one',
RouteTwo= 'two',
RouteThree= 'three',
RouteFour= 'four'
}
Reacted by Pedro Cerejo and Vlad Dumbrava
Activity
test(router): cover enum outlet route values