添加--flat 参数,表示不创建单独的目录例如ng g c news/news-detail会将文件创建在app/news/news-detail目录下ng g c news/news-detail --flat会将文件创建在app/news目录下