ng g component **name** --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.
ng g component **name** --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.