質問

I know the proper folder structure for an Angular application should be like this:

/app
    /core module
        /components
        /services
    /feature module
        /components
        /services
        /models
    /shared
        /components
        /constants
        /directives
        /interceptors
        /interfaces
        /models
        /pipes
        /sass
        /services

But I've got a welcome page and a bunch of sub modules associated with a main module. Does it make sense to nest those modules within the parent module, like this?

/app
    /core module
        /components
        /services
    /main configuration module
        /sub module one 
            /components
            /services
            /models
        /sub module two 
            /components
            /services
            /models
    /shared
        /components
        ...

Or should I not nest them and leave the folder structure like this:

/app
    /core module
        /components
        /services
    /main module
        /components
        /models
        /services
    /sub module one 
        /components
        /services
        /models
    /sub module two 
        /components
        /services
        /models
    /shared
        /components
        ...

I know this is probably a very personal choice for most people but I'm not the only one working on this codebase and I'd like to put together something that other developers will be able to use easily enough.

役に立ちましたか?

解決

In my opinion, you can create a routing module for the main plan and assign that two sub-plan to it.

The first option is more suitable.it will also be in help full in future if any conf conflict occurs.

ライセンス: CC-BY-SA帰属
所属していません softwareengineering.stackexchange
scroll top