简体   繁体   中英

Component name in angular 2+

When we execute ng g c componentname then it generate files with suffix . component.ts . component.ts . For instance:

ng g c suruchi will create files suruchi.component.ts i want generated component files name to be only suruchi.ts

Kindly suggest any provision.It will be appreciated.

Try this: ng g c suruchi --type=

I think there is no cli command for generate component without .component suffix. So you have to create files manually and then add the reference in the module file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM