如何为 Angular 10 中的模块创建文件夹结构
How to create folder structure for modules in 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
以上文件夹结构给出了一种微服务架构,其中每个模块都有自己的services/dependencies。
我有两个模块,比如教育和交通。我想为这些创建模块和组件。如何为这些创建一个完美的文件夹结构。有知道的请帮忙
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
以上文件夹结构给出了一种微服务架构,其中每个模块都有自己的services/dependencies。