如何在angular10中为模块创建文件夹结构



我有两个模块,教育和交通。我想为这些创建模块和组件。如何为这些创建一个完美的文件夹结构。如果有人知道,请帮助。

education
->school
--> 1std component 
--> 2std component
--> 3std component
->college
--> arts component
--> engg component 
--> diploma component 

transport
->cycle
--> small component 
--> medium component 
--> large component 
->bike
--> pulsar component 
--> honda component 
--> hundai component 

演示:https://stackblitz.com/edit/angular-ivy-atpxot?file=src%2Fapp%2Fapp.module.ts

下面的文件夹结构可能对你有用!

-app

-shared
-services
-pipes
-components
-models
-modules
-education
-components
-school
-college
-models
-education.model.ts
-services
-education-service.ts
-education.component.ts // this component should act like a container
-education.component.html
-education.component.module.ts        
-education.component.route.ts
-transport
-components
-cycle
-bike
-models
transport.model.ts
-services
transport.service.ts

-transport.component.ts // this component should act like a container
-transport.component.html
-transport.component.module.ts        
-transport.component.route.ts
-app.component.ts
-app.component.html
-app.module.ts
-app-routing.module.ts

上面的文件夹结构也提供了一种微服务架构,每个模块都有自己的服务/依赖项。