2017-06-02 19 views
1

我正在Visual Studio 2015中開發一個帶有Angular 4的商業Web應用程序,根據用戶訪問這個應用程序有幾個區域可以訪問,也就是說,如果用戶被授權,他可以進入銷售區域,購物,會計等,這些「區域」中的每一個都有其自己的菜單等。 什麼是文件結構能夠滿足上述要求? 的想法是訪問自己的模塊和/或部件儘可能使用asp.net MVC的「地區」,採用了棱角分明4(前端)什麼是使用Angular 4構建區域的文件結構就像asp.net

回答

0

理想情況下,你會有這樣的結構:

app 
- shared // shared comp's and pipes 
- core // singletons and a module to import into app.module 
- user-access // a folder like this for each feature/access level 
    - base-component // this would house your router-outlet and navigation 
    - components 
    - guards // auth guards to prevent access if not authenticated 
    - user-access.module.ts // contain routes and declarations for this access group 
- app.component.ts 
- app.module.ts //etc. 
+0

感謝您的回覆,我清楚你提到的這些文件夾是由一個基本結構的主題提供的,然後是其他文件夾管理他們所在的「區域」,就像你打電話給他們的那樣,知道該場景是幾個區域如銷售等,? – cyenque