Angular πŸ‡ΊπŸ‡¦ - practical notes
1.63K subscribers
1.6K photos
1 file
532 links
Angular - practical notes

This group is for posting practical notes for Angular developers. Mostly all posts are for quick implementation https://t.me/angular_practical_notes (Commenting on posts only in ENG and UA langs here). Welcome!
Download Telegram
❀️ OAuth2 Integration with Angular 18

#angular #OAuth2 #guide

OAuth2 is a popular authorization framework that allows third-party services to authenticate users without sharing credentials. It’s a powerful protocol for securing Angular applications by delegating authentication and authorization to a trusted identity provider like Google, Facebook, or your own backend server.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2
🚯 Magic of Generators

#js #generators

Generators: Advantages

β€” Fine-Grained Control: Generators give you the ability to pause and resume function execution at will. This can be a game-changer in scenarios like lazy evaluation, custom iteration logic, or complex control flows.

β€” Memory Efficiency: Since generators produce values on demand, they are highly memory-efficient, making them perfect for handling large datasets or streams.

β€” Readable Asynchronous Code: While async/await has largely supplanted many asynchronous handling methods, generators still offer a unique combination of readability and control, making complex asynchronous flows easier to manage.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1
🌐 Angular : Best practices after the renaissance #1

#angular #controlFlow

Control flow (from version β‰₯ 17)

One of the biggest improvements in Angular is the introduction of new syntax for handling HTML. The updated syntax for managing conditions and iterations significantly enhances code clarity and maintainability. Previously, directives like *ngIf and *ngFor were used, but the new syntax offers more streamlined and cleaner ways to handle such scenarios.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2❀1
πŸ“„ The Adapter Pattern in TypeScript

#ts #patterns #adapter

The Adapter Pattern is a structural design pattern that allows incompatible interfaces to work together by providing a "wrapper" or "adapter" around an existing class. Below is a real-world example of the Adapter Pattern in TypeScript, where we want to integrate a new payment gateway into an existing e-commerce application.


βœ… Article link
πŸ‘1
🌐 Angular : Best practices after the renaissance #2

#angular #standalone

Using standalone components gives you more control over your components compared to the traditional NgModules approach. It allows you to import components directly into each other without the need to go through modules. Standalone components help reduce the number of modules in your project, which translates to less code to manage.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1
🌐 Angular : Best practices after the renaissance #3

#angular #inject

In this section, I want to emphasize the importance of using the utility function inject() for service or component injection, rather than relying on the traditional constructor-based approach. The inject() function is more flexible and allows for cleaner, more readable code. It simplifies testing, supports better dependency management, and aligns with Angular's ongoing improvements to enhance the developer experience. By adopting inject(), you can take advantage of a more modern and efficient way to handle dependency injection in Angular applications.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘3
πŸ’› NgTemplateOutlet Type Checking

#angular #directive #ngTemplateOutlet

βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯4πŸ‘2
🚱 No more try-catch

#js #trycatch

An amazing new JavaScript operator has arrived and things are not looking too good for try-catch!

While we wait for ?= to become natively integrated into JavaScript, we can start it now with this polyfill


βœ… Article Link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1