I am learning Angular routing going through Angular doc but not able to understand the --flat
in ng
command
ng generate module heroes/heroes --module app --flat --routing
I am learning Angular routing going through Angular doc but not able to understand the --flat
in ng
command
ng generate module heroes/heroes --module app --flat --routing
ng generate module app-routing --flat --module=app
--flat puts the file in src/app instead of its own folder.
--module=app tells the CLI to register it in the imports array of the AppModule.
Read more here https://angular.io/tutorial/toh-pt5
This is what the Angular Docs have to say:
When true, creates the new files at the top level of the current project root.
Default: false
Since you've written heroes/heroes
, the files will be created in a folder named heroes
Read more about it here