Angular CLI项目的最佳项目结构[关闭]

问题描述 投票:-1回答:1

我正在为我的Angular CLI项目寻找最佳的项目结构,以使它们在将来更具开发性。

angular directory-structure organization project-structure
1个回答
-2
投票

根据Angular.io,这是正确的文件夹结构:

<project root>
  |--src
  |  |--app
  |  |  |--core
  |  |  |  |--exception.service.ts|spec.ts
  |  |  |  |--user-profile.service.ts|spec.ts
  |  |  |--heroes
  |  |  |  |--hero
  |  |  |  |  |--hero.component.ts|html|css|spec.ts
  |  |  |  |--hero-list
  |  |  |  |  |--hero-list.component.ts|html|css|spec.ts
  |  |  |  |--shared
  |  |  |  |  |--hero-button.component.ts|html|css|spec.ts
  |  |  |  |  |--hero.model.ts
  |  |  |  |  |--hero.service.ts|spec.ts
  |  |  |  |--heroes.component.ts|html|css|spec.ts
  |  |  |  |--heroes.module.ts
  |  |  |  |--heroes-routing.module.ts
  |  |  |--shared
  |  |  |  |--shared.module.ts
  |  |  |  |--init-caps.pipe.ts|spec.ts
  |  |  |  |--filter-text.component.ts|spec.ts
  |  |  |  |--filter-text.service.ts|spec.ts
  |  |  |--villains
  |  |  |  |--villain
  |  |  |  |  |-- ...
  |  |  |  |--villain-list
  |  |  |  |  |-- ...
  |  |  |  |--shared
  |  |  |  |  |-- ...
  |  |  |  |--villains.component.ts|html|css|spec.ts
  |  |  |  |--villains.module.ts
  |  |  |  |--villains-routing.module.ts
  |  |  |--app.component.ts|html|css|spec.ts
  |  |  |--app.module.ts
  |  |  |--app-routing.module.ts
  |  |--main.ts
  |  |--index.html
  |  |-- ...
  |--node_modules/...
  |--...
© www.soinside.com 2019 - 2024. All rights reserved.