Internationalization (i18n)
- built in ⟶
See here
- There are also excellent libraries:
ngx-translate
- You can decide ;-)
Redux
- «Predictable state container for JS Apps»
- whole application state in one single store
- easy to persist (local storage) and also very easy to debug.
- excellent Angular implementation: ngrx
How to structure my app?
Naming
- good pattern: name things after a term that describes what they do!
- e.g.:
- visitor.component.ts
- visitor.service.ts
- visitor.model.ts
How to structure my app? (2)
folder structure
- no clear concepts as for example in Java
- Start very easily!
- only build complex structures or many modules if you need them! ⟶
YAGNI-principle
How to structure my app? (3)
where to place test files
- same as before: no clear concepts compared to Java (main / test)
- kind of the standard nowadays: put your test files next to your files under test
- do not separate what belongs together
- easier to find things, to move things around
How to structure my app? (4)
Styling
- put global styles in styles.(s)css in the /src folder.
- styles that are only relevant for a single component (e.g. a button) should be put in the corresponding stylesheet of the component⟶ reusability!