Skip to content

Code Style

Mario Romano edited this page May 5, 2016 · 16 revisions

The code style is defined in the tslint.json and .editorconfig files.

conventions: -private functions and variables must have "private" keyword and named with "_" has suffix.

Component structure:


-root
   -i18n
      -en.json
      -it.json
      -gr.json
   -src
      -components
         -example-name.component.ts
         -example-name.component.spec.ts
         -example-name.component.html
         -example-name.component.css
      -directives
         -example-name.directive.ts
         -example-name.directive.spec.ts
      -models
         -example-name.model.ts
         -example-name.model.spec.ts
      -services
         -example-name.service.ts
         -example-name.service.spec.ts
   -.travis.yml
   -README.md
   -LICENSE
   -package.json
   -tslint.json
   -tsconfig.json
   -.editorconfig
   -typings.json

May you want to use our yeoman generator to create a new component generator-ng2-alfresco-component

Clone this wiki locally