Ionic 3文件夹结构

eul*_*ode 1 typescript ionic-framework ionic2 ionic3 angular

在离子1中,我将基于模块的文件夹分开

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

  scss
  - ....
Run Code Online (Sandbox Code Playgroud)

那么,离子2是否遵循最佳的文件夹结构实践?

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

user-login
...

user-profile
...

user-edit-profile
....
Run Code Online (Sandbox Code Playgroud)

或者我应该创建一个用户模块文件夹作为所有用户页面的父文件夹?

Sam*_*ath 7

您需要使用通过使用生成的默认文件夹结构CLI.这是使用Ionic的最佳和最常见的方式.也是Ionic团队推荐的.

它是这样的:

pages
    user-list
    - user-list.html
    - user-list.scss
    - user-list.ts
    - user-list.module.ts
Run Code Online (Sandbox Code Playgroud)

除了pages这里,你将有providers,components,modelspipes文件夹结构太.