π Angular Internationalization Set-up in Existing Project
#angular #internationalization #i18n
Step 1: Install @angular/localize
Step 2: Update Angular JSON
Second screen
Step 3: Extract Messages
Step 4: Translate Messages
Step 5: Build and Serve
β Article link: https://levelup.gitconnected.com/angular-internationalization-set-up-in-existing-project-891dcf6cee95
#angular #internationalization #i18n
Step 1: Install @angular/localize
$ ng add @angular/localize
Step 2: Update Angular JSON
Second screen
Step 3: Extract Messages
$ ng extract-i18n --output-path src/locale
This command will create XLF files in the specified locations (src/locale/messages.ar.xlf,src/locale/messages.fr.xlf)
Step 4: Translate Messages
Translate the messages in each XLF file for the supported languages as mentioned in Angular Documentation here.
Step 5: Build and Serve
$ ng build --localize
$ ng serve --configuration fr --port 4100 // Opens french version on port 4100
$ ng serve --configuration ar --port 4200 // Opens arabic version on port 4200
β Article link: https://levelup.gitconnected.com/angular-internationalization-set-up-in-existing-project-891dcf6cee95
β€2
π Master JavaScript Generators: 5 Practical Use Cases
#js #generators
β Article link: https://javascript.plainenglish.io/javascript-generators-e4cdaa02839a
#js #generators
Generators are these magical functions that you pause and resume, whenever you want β they donβt execute continuously.
β Article link: https://javascript.plainenglish.io/javascript-generators-e4cdaa02839a
π CSS variables in Angular: ng-deep is no longer needed
#angular #css #ngDeep
β Article link: https://medium.com/@maks-dolgikh/css-variables-in-angular-ng-deep-is-no-longer-needed-part-2-3ac60f8a4abc
#angular #css #ngDeep
β Article link: https://medium.com/@maks-dolgikh/css-variables-in-angular-ng-deep-is-no-longer-needed-part-2-3ac60f8a4abc
π "Goodbye NgRx Facades. Hello Standalone Functions"
#angular #ngrx
β Article link: https://javascript.plainenglish.io/goodbye-ngrx-facades-hello-standalone-functions-7b7606c01659
#angular #ngrx
Letβs list out the benefit of standalone functions:
-- Decouple tight dependency between the component and the store.
-- Simplifies CRUD operation with the store, by providing simple interfaces for the component to use to interact with the store.
-- Reusability!
-- No need to create a service(facade) to encapsulate NgRx logic.
-- Stand alone functions are not tied to a class, meaning each can be imported and used individually.
-- Reduces the need to inject multiple facade dependencies.
β Article link: https://javascript.plainenglish.io/goodbye-ngrx-facades-hello-standalone-functions-7b7606c01659
π₯2
π€ REST API Design Best Practices
#api #restApi
β Article link: https://medium.com/@techworldwithmilan/rest-api-design-best-practices-2eb5e749d428
#api #restApi
There are different types of API protocols:
REST β relies on a client/server approach that separates the front and back ends of the API and provides considerable flexibility in development and implementation.
RPC β The remote procedural call (RPC) protocol sends multiple parameters and receives results.
SOAP β Supports a wide range of communication protocols found across the internet, such as HTTP, SMTP, and TCP.
WebSocket β Provides a way to exchange data between browser and server via a persistent connection.
β Article link: https://medium.com/@techworldwithmilan/rest-api-design-best-practices-2eb5e749d428
β€2
π Passing CSS variables to Angular child +
#angular #css #has
β Article link: https://medium.com/@bebrasmell/passing-css-variables-to-angular-child-7465646166eb
:has#angular #css #has
β Article link: https://medium.com/@bebrasmell/passing-css-variables-to-angular-child-7465646166eb
π Understanding MIME Type Validators with Angular
#angular #fileReader
βοΈWhat are MIME Type Validators?
βοΈPurpose of MIME Type Validation
β Article link: https://enlear.academy/understanding-mime-type-validators-with-angular-3ff9bc2af559
#angular #fileReader
βοΈWhat are MIME Type Validators?
MIME (Multipurpose Internet Mail Extensions) types are used to identify the type of content delivered in a file. MIME type validators, in the context of Angular, are functions or classes that verify whether a fileβs MIME type matches the expected type.
βοΈPurpose of MIME Type Validation
The primary purpose of MIME type validation is to verify that the content of a file aligns with the expected format. This is especially crucial when dealing with sensitive file types, such as images, where incorrect MIME types could lead to rendering issues or security vulnerabilities.
β Article link: https://enlear.academy/understanding-mime-type-validators-with-angular-3ff9bc2af559
π€ Simplify Complexity with the Facade Design Pattern in TypeScript
#ts #patterns
β Article linkπ Code Link
#ts #patterns
Life is full of complexities. Even when we go about our everyday routines, we often interact with systems that are intricate behind the scenes but seem simple on the surface. Imagine driving a car. We donβt need to understand the nuances of its internal combustion engine or the intricacies of its transmission system. We just turn the key, press the gas pedal, and off we go!
The same principle applies in the realm of software development, where we often encounter systems with daunting complexity. Thatβs where the Facade Design Pattern comes in handy. It provides a simplified, easy-to-use interface over a more complex underlying system, just like the controls in our car!
β Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
π1