Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: page generator does not work on standalone applications #1873

Closed
vscaiceanu-1a opened this issue Jun 10, 2024 · 0 comments · Fixed by #2017
Closed

[Bug]: page generator does not work on standalone applications #1873

vscaiceanu-1a opened this issue Jun 10, 2024 · 0 comments · Fixed by #2017
Labels
bug Something isn't working priority:medium

Comments

@vscaiceanu-1a
Copy link
Member

vscaiceanu-1a commented Jun 10, 2024

Package name

core, schematics

Package version

10.3.6

Reproduction steps

npm create @o3r otter-project
cd otter-project
ng g application webapp
# choose preset BASIC, NO Jest and NO Playwright when prompted
ng g page my-page
? Application routing module path? ./src/app/app-routing.module.ts
Generate component with Otter fixture? Yes
Generate future components with useComponentFixtures by default? Yes, always

Current result

    Cannot read ./src/app/app-routing.module.ts
    No Routes declaration found
CREATE apps/webapp/src/app/my-page/my-page.module.ts (425 bytes)
CREATE apps/webapp/src/app/my-page/my-page.component.ts (417 bytes)
CREATE apps/webapp/src/app/my-page/my-page.spec.ts (890 bytes)
CREATE apps/webapp/src/app/my-page/my-page.style.scss (0 bytes)
CREATE apps/webapp/src/app/my-page/my-page.template.html (22 bytes)
CREATE apps/webapp/src/app/my-page/README.md (36 bytes)
CREATE apps/webapp/src/app/my-page/index.ts (34 bytes)
CREATE apps/webapp/src/app/my-page/my-page.fixture.ts (104 bytes)
UPDATE angular.json (4454 bytes)

Expected result

No errors and routing correctly handled.

Additional comments

Coming from page schematics:

packages/@o3r/schematics/src/utility/routes.ts and packages/@o3r/core/schematics/page/index.ts

@vscaiceanu-1a vscaiceanu-1a added bug Something isn't working triage labels Jun 10, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 5, 2024
)

## Proposed change

Try to detect automatically the routes definition

## Related issues

- 🐛 Fixes #1873
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants