创建没有文件夹的组件 [英] Create Component without folder

查看:16
本文介绍了创建没有文件夹的组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个没有文件夹的组件.我正在使用 Angular-Cli 命令 ng g c testing 来创建组件.但是,该命令会为新创建的组件创建一个文件夹包装器.

I need to create a component without the folder. I am using Angular-Cli command ng g c testing to create the component. But, the command creates an folder wrapper for the newly created component.

推荐答案

您可以使用 --flat 标志.

ng g c test --flat

有关更多信息,请关注此链接

For more information follow this link

平坦 = 真 |假

如果为 true,则会在当前项目的顶层创建新文件.

When true creates the new files at the top level of the current project.

默认值:false

这篇关于创建没有文件夹的组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆