- NodeJs: 8+
Run npm i
to install project dependencies
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Good
const hello = "world";
Bad
const hello = 'world';
Good
console.log("world");
Bad
console.log("world")
We use spaces. 4 spaces to be more specific.
Good
export class HelloWorld {
@Input()
public value: string;
}
Bad
export class HelloWorld {
@Input() public value: string;
}
Max line length is 140 caracters.
Good
export class HelloWorld {
constructor(private serviceA: ServiceA,
private serviceB: ServiceB,
private serviceC: ServiceC,
private serviceD: ServiceD) {}
}
Bad
export class HelloWorld {
constructor(private serviceA: ServiceA, private serviceB: ServiceB, private serviceC: ServiceC, private serviceD: ServiceD) {}
}
src
app
api
components
directives
features
guards
modals
pipe
providers
store
utils
assets
fonts
i18n
icons
environments
This folder contains all the code of the angular applications
This section contains the logic of the api. In other words, all communication with the different api is handle in this section. This section also contains all the model of the data from the different services.
This section contains all the global components of the Angular application.
This section contains all the pages of the Angular application. Each page must have its own store and can have custom components and modal.
A page structure must look like this
page
components
store
page.actions.ts
page.effects.ts
page.reducer.ts
page-routing.module.ts
page.component.ts
page.module.ts
page.style.scss
page.template.html
This section contains all the global directives of the Angular application.
This section contains all the global guards of the Angular application.
This section contains all the global modals of the Angular application.
This section contains all the global pipes of the Angular application.
This section contains all the global providers of the Angular application.
This section contains all the global stores of the Angular application.
This section contains all the utils of the Angular application.
This folder constains all the assets of the project.
All the fonts used in the project must be in this folder.
All translation file are in this folder. Translation file are key -> value file (json format) containing all translation of the application.
All the icons used in the project must be in this folder
This section contains the different environment file (dev, staging, production) of the application.