How to create app.module.ts in an existing Angular 18 project?

Discussão em 'Angular' iniciado por Moh.Alkasem, Outubro 12, 2024.

  1. Moh.Alkasem

    Moh.Alkasem Guest

    I’m using Angular 18.2.8 and I’ve already created a project and worked on it. However, I noticed that the project does not include an app.module.ts file. After searching, I found that starting from Angular 17, the default structure might not include this file due to the introduction of standalone components.

    However, I want to transition to the traditional module-based structure (with app.module.ts). Is there a way to generate an app.module.ts file in Angular 18 using Angular CLI? Or do I need to manually create and configure it?

    I have tried this command : ng new --no-standalone

    But got : Error: This command is not available when running the Angular CLI inside a workspace.

    Continue reading...

Compartilhe esta Página