skip to Main Content

When I create an angular project there are some missing files in the creation like app.modules.ts and app-routing.modules.ts

I create the project using the command ng new name

this is a screen shot of all the files created:

2

Answers


  1. See which version of the angular you are using. In the 17th version, a project is created with standalone components by default. So you don’t have those files.

    Login or Signup to reply.
  2. Angular ver.17 by default makes every component to standalone so there is no need for ng-module decorators anymore.

    In-case you want to add/need app.module.ts then use
    ng new <app-name> --standalone false command while creating new application.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search