Angular build version

SemVer. Add 'node' to 'tsconfig.app.json': Add 'appVersion' to 'src/environments/environment.prod.ts': Add 'appVersion' to 'src/environments/environment.ts': Add 'appVersion' attribute for the main 'AppComponent': CLI commands to bump up the version via npm:

Angular data store

user.service.ts: user-control.component.ts: Don't expose subjects directly In this example we don't expose the subject directly to store clients, instead, we expose an observable. This is to prevent the service clients from themselves emitting store values directly instead of calling action methods and therefore bypassing the store. Avoiding event soup Exposing the subject directly could lead ... Read more

Writing for web

Text should be simple, concise, and direct. Avoid the pronoun “we” Focus on the user and what they can do with your app, rather than what you or your app is doing for the user. Do: Get started with these popular posts on Google+ Don't: To get you started, we’re showing you popular posts on ... Read more

Angular Internationalization (i18n)

New Transloco approach: Summary: Actively maintained l10n Scematics Migrate from ngx-translate to Transloco script: Links: Transloco Transloco on Github Popular ngx-translate approach: Summary: Not actively supported. http://www.ngx-translate.com/ https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-angular-app-with-ngx-translate Official Angular i18n approach: Summary: Complex to setup: separate build per every language in production Complex in development: separate local server instance per every language Run command ... Read more

Angular Material Theme

Also add these classes to the body: class="mat-app-background mat-typography" Getting started with Angular Material themening Using Material styles for styling components: A material palette consist of a range of colors with different contrast. They use a number system as a key for which color to use. The 500 is the default color. Add default Material ... Read more

Angular project structure / folder structure / architecture

Shared Module: The Shared module should contain components, directives, pipes, and services that can be reused across multiple other modules in the application. It typically includes: Reusable components: UI components that are used in multiple parts of the application, like buttons, input fields, or navigation elements. Common directives: Custom directives that are used in several ... Read more

DevOps

Typical .gitlab-ci.yml Gitlab CI script: .gitlab-ci.yml Sample CI file: Examples: Reuse code inside of .gitlab-ci.yml file Manual deploy only from hotfix or feature branches Show RAM and storage: Angular unit testing in Gitlab