Angular uses spinal-case for its custom attributes and camelCase for the corresponding directives which implement them
best practices: https://github.com/johnpapa/angular-styleguide
Rules:
- Each
feature directory
(https://github.com/johnpapa/angular-styleguide#style-y121) also containsfeature.shared.js
file (customer.shared.js
,supplier.shared.js
) to share code between another files in samefeature directory
. If code (functions: calculating formular, ...) is used betweenfeature directory
, put it toUI
service. component
directory containsdirectives
andmodal
ortemplate html
(<script id="error-list.html" type="text/ng-template"></script>
(maybe separating it totemplates
directory. I haven't decided it)- Services just take care model (processing received data from server before return to controller), don’t do anything relates to ui (html)
- Exception:
UI
service is using to share code, shared data relates to UI (data is used to be exchanged between views, directives, cont