2017-09-19 17 views
0

在離子1,i的模塊我的文件夾中分離基於這樣離子3的文件夾的結構化

user 
    html 
    - user-list.html 
    - user-login.html 
    - user-profile.html 
    - user-edit-profile.html 

    scss 
    - .... 

因此,在離子2以下的最佳文件夾的結構化的做法?

user-list 
- user-list.html 
- user-list.scss 
- user-list.compoment.ts 
- user-list.module.ts 

user-login 
... 

user-profile 
... 

user-edit-profile 
.... 

或者我應該創建一個用戶模塊文件夾的所有用戶頁面父文件夾?

+0

請參閱此示例應用程序(https://github.com/ionic-team/ionic-conference-app) – Duannx

回答

3

您需要使用由CLI生成的默認文件夾結構。這是使用離子的最好和最常用的方式,也是由離子團隊推薦的。

它是這樣的:

pages 
    user-list 
    - user-list.html 
    - user-list.scss 
    - user-list.ts 
    - user-list.module.ts 

除了pages這裏您將有providerscomponentsmodelspipes文件夾結構太。