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
๐Ÿ“„ Composite Design Pattern

#js #patterns #composite

Composite: Basic Idea
The first thing we need to look at is the definition offered by the book from the Gang of Four:

โ€œCompose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.โ€


โœ… Article link
This media is not supported in your browser
VIEW IN TELEGRAM
๐Ÿ“„ AI writing assistant

#js #react #ui_element

....Imagine youโ€™ve created an amazing AI writing assistant giving helpful suggestions for writing engaging stories....


โœ… Article link
This media is not supported in your browser
VIEW IN TELEGRAM
๐Ÿ“„ When to Use the BroadcastChannel

#js #BroadcastChannel

/** Same Origin */

const channel = new BroadcastChannel("paymentChannel");

channel.postMessage("Payment Completed!");

channel.addEventListener(
"message",
(event) => {
const message = event.data;
console.log(message);
}
);


โœ… Article link
๐Ÿงช ECMAScript 2024 (ES15): JS Features

#js #es #es2024 #es15 #withResolvers #groupBy #temporal #tuples #decorators

ECMAScript 2024 (ES15) is just around the corner, arriving in June 2024. This new version brings many exciting features that promise to simplify your JavaScript code and boost your productivity โ€” giving you even more time to relax! Letโ€™s dive into five of the most impactful additions.


โœ… Article link
Hello team! As promised, here is a custom smiley pack for the channel that will decorate the articles.

๐ŸŒ๐Ÿ’ โ“‚๏ธ๐Ÿšญโ—๏ธ๐Ÿ’˜โ™Œ๏ธ๐Ÿ…พ๏ธ๐Ÿ†š
๐Ÿฉทโค๏ธ๐Ÿ’›๐Ÿ’š๐Ÿฉต๐Ÿ’™๐Ÿ–ค๐Ÿฉถ๐Ÿค
๐ŸคŽโค๏ธโ€๐Ÿ”ฅโค๏ธโ€๐Ÿฉนโฃ๏ธ๐Ÿ’•๐Ÿ’ž๐Ÿ’“๐Ÿ’—๐Ÿ’–
๐Ÿ”ฏ๐Ÿ•Žโ˜ฆ๏ธ๐Ÿ›โ›Žโ™ˆ๏ธโ™‰๏ธโ™Š๏ธโ™‹๏ธ
โ˜ข๏ธโ˜ฃ๏ธ๐Ÿ“ด๐Ÿ“ณ๐Ÿˆถ๐Ÿˆš๏ธ๐Ÿˆธ๐Ÿˆบ๐Ÿˆท๏ธ
๐Ÿšซ๐Ÿ’ขโ™จ๏ธ๐Ÿšท๐Ÿšฏ๐Ÿšณ๐Ÿšฑ๐Ÿ”ž๐Ÿ“ต
โ•โ”โ€ผ๏ธโ‰๏ธ๐Ÿ”…๐Ÿ”†ใ€ฝ๏ธโš ๏ธ๐Ÿšธ
๐Ÿ”ฑโšœ๏ธ๐Ÿ”ฐโ™ป๏ธโœ…๐Ÿˆฏ๏ธ๐Ÿ’นโ‡๏ธโœณ๏ธ


You can thank us at the link below:

๐Ÿ’ต PayPal: luckystudydanit@gmail.com
๐Ÿ’ต SWIFT code: UNJSUAUKXXX
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘4โค1๐Ÿ”ฅ1
๐ŸŒ Angular 18 : @let Operator

#angular #let

The @let operator allows you to define and assign variables directly within your Angular templates. This can help streamline your code, especially when working with asynchronous data. One of the biggest advantages is that it allows you to use the async pipe without worrying about unsubscribing from observables manually.


โœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ’ โ“‚๏ธ Angular Apps with Nginx in Docker

#angular #docker #guide

โœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘2โค1
๐Ÿ“ต DOM Events and Pub/Sub

#js #patterns

Pub/Sub, which means Publish-Subscribe, uses a more structured approach. Instead of depending on DOM components, it uses a central message bus, similar to an events message board. Here is the summary:

- Publishers: These are the event announcers who broadcast messages (events) via the messaging bus.
- Subscribers: These are the visitors who registered to receive specific announcements (events). When a relevant interaction comes, subscribers get notified and can take action.


โœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘2
๐Ÿšณ Interview Questions: Promise object

#js #interview #promise

Problem: Implement a simple version of Promise:

The Promise object is an asynchronous programming solution for handling asynchronous events. Promise objects can represent the status of an asynchronous operation, including:

- pending
- fulfilled
- rejected

Analysis:

๐ŸŒถThe MyPromise class is a custom Promise class whose constructor accepts an executor function as a parameter.
๐ŸŒฝThe executor function in the constructor will be executed immediately and accepts two parameters, resolve and reject, which are used to modify the state of the Promise.
๐ŸžThe resolve method is used to modify the Promiseโ€™s status from โ€œpendingโ€ to โ€œfulfilledโ€ and pass the value to subsequent handlers.
๐ŸฅšThe reject method is used to modify the Promiseโ€™s status from โ€œpendingโ€ to โ€œrejectedโ€ and pass the reason to the subsequent handler.
๐ŸณThe then method is used to register a callback function to be executed when the Promise is completed or rejected. It accepts two parameters: onFulfilled and onRejected, which are called when the Promise is completed or rejected respectively.
๐ŸฅฉThe then method returns a new MyPromise instance to support chained calls. If onFulfilled or onRejected returns a value, it will be used as the resolved value for the next MyPromise instance.
๐Ÿ”The catch method is the shorthand form of then(null, onRejected).
๐Ÿ•The isFulfilled method is used to check whether the Promise is in the fulfilled state.
๐ŸŒฎThe isRejected method is used to check whether the Promise is in the rejected state.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘4