Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Why doesn't App Module exist in Angular 17?

Tags: angular

Today, I just started exploring Angular version 17 using ng new and found a problem for the newly created project using the command - ng new.


The problem is:

    • Path "/src/app/app.module.ts" does not exist while doing ng add in the Angular project.
    • The ‘ng new’ does not generate app.module.ts in the src root folder Angular CLI 17.0.0.

From Angular 17 onwards, standalone is now the new default for the CLI. So when we create a new project ‘app.module.ts’ file will not create Path "/src/app/app.module.ts".


Run the following command to create the new project including the file ‘app.module.ts’ in your project:

ng new AngularMap  --no-standalone


Note: Here ‘AngularMap’ is the project name I created.

Standalone components are a feature introduced in Angular version 14. Now the changes applied in angular 17 default, the Angular team strongly recommends using them as they are easier to use, and understand.



This post first appeared on Programming, please read the originial post: here

Share the post

Why doesn't App Module exist in Angular 17?

×

Subscribe to Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×