@@ -64,9 +64,9 @@ Here are the questions and problems:
6464
6565 如何让我的代码容易被同事们维护?
6666
67- #### Folder structure
67+ ### Folder structure
6868
69- #### 文件夹结构
69+ ### 文件夹结构
7070
7171Since Angular CLI stepped in most of the Angular projects are scaffold with it. Hence we often have a well known poject structure.
7272
@@ -134,9 +134,9 @@ Right: in `framework` folder because it's a generaly used functionality.
134134
135135那么,我们应该把应用外壳放到什么位置?说对了!就放到 ` framework ` 文件夹中,因为它是一种通用的功能。
136136
137- #### Cut your code into modules
137+ ### Cut your code into modules
138138
139- #### 把代码切分成模块
139+ ### 把代码切分成模块
140140
141141Next let's talk about the ` features ` .
142142To get the idea of the features of an app it's always a good strategy to look at the menu/navigation.
@@ -186,9 +186,9 @@ in fact that means:
186186
187187 <h3 >不要用一个指令管理一切。no adme <small >(a directive managing everything)</small ></h3 >
188188
189- #### FAQ
189+ ### FAQ
190190
191- #### 常见问题
191+ ### 常见问题
192192
193193> <i >Q: But if I split everything into modules it is possible to have too many modules?</i >
194194>
@@ -199,9 +199,9 @@ A: No! The maintainability grows by the number of modules. Split your app into m
199199
200200A:不会!增加模块数量会增加可维护性。把你的应用拆分成模块,再把你的模块拆分成子模块。
201201
202- #### Type of components
202+ ### Type of components
203203
204- #### 组件的类型
204+ ### 组件的类型
205205
206206So what about Components? Components represent the UI stuff of our app. We can break them up into two categories:
207207
@@ -245,9 +245,9 @@ Those small parts can be presentational components
245245
246246![ 展现组件] ( images/dump_component.png )
247247
248- #### Reuse code
248+ ### Reuse code
249249
250- #### 复用代码
250+ ### 复用代码
251251
252252Components can be reused but logic can be reused, too. We can relocate logic into services.
253253
@@ -278,9 +278,9 @@ Almost all logic in am app should fit to one of the following categories:
278278> 不要乱用依赖树。只在最需要的地方提供逻辑。它可能是一个组件或一个模块,甚至是另一个服务。
279279>
280280
281- #### Stay maintainable
281+ ### Stay maintainable
282282
283- #### 保持可维护性
283+ ### 保持可维护性
284284
285285Maybe your structure is very deep.
286286And this means you have looooong imports.
@@ -321,9 +321,9 @@ which can maybe change your developer live
321321import { MyService } from " @my-logic/my-service/my.service" ;
322322```
323323
324- #### Follow the style guide
324+ ### Follow the style guide
325325
326- #### 遵循风格指南
326+ ### 遵循风格指南
327327
328328that’s the structure of our companies feature
329329
@@ -361,17 +361,17 @@ You'll find the styleguide <a href="https://angular.io/guide/styleguide" target=
361361
362362你可以在[ 这里] ( https://angular.io/guide/styleguide ) 找到风格指南
363363
364- #### Conclusion
364+ ### Conclusion
365365
366- #### 结论
366+ ### 结论
367367
368368Huge apps are easy to maintain, if you follow some rules and use the awesome features of Angular CLI and Typescript. Don't be scrared, it's just Angular ;)
369369
370370如果遵循一些规则并发挥 Angular CLI 和 TypeScript 的强大功能,那些庞大的应用就很容易维护。不要害怕,它只是 Angular;)
371371
372- #### Special Thanks
372+ ### Special Thanks
373373
374- #### 特别感谢
374+ ### 特别感谢
375375
376376I would like to give special thanks to the awesome people that reviewed this post and gave me pointers:
377377
0 commit comments