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
🚳 Interview Questions: JSONP cross-domain implementation

#js #interview #jsonp

Analysis: Create the script node script.src, set the callback function callbackName, parse the parameters and splice the URL, dynamically insert it into the body to implement JSONP cross-domain request, and return the Promise interface.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ“΅ Interview Questions: Implement deep cloning

#js #interview #deepClone

Analysis: Recursively implement deep cloning of objects and arrays, returning basic types directly, and reference types recursively call deep cloning hierarchically.
Please open Telegram to view this post
VIEW IN TELEGRAM
Hello, friends!
As you can see, I'm a Ukrainian software engineer who tries to do volunteer fundraisers to support the Armed Forces of Ukraine. Sometimes it takes a lot of time and I am not able to maintain this channel for you. Please help me close these fundraisers because without the Ukrainian army there will be nothing Ukrainian. Thank you very much!

πŸ’΅ FOR Ukraine:
https://send.monobank.ua/jar/5TvPibajtR
5375 4114 1222 8582

🌎 FOR ALL DONATS:

πŸ’΅ SWIFT code: UNJSUAUKXXX

πŸ’΅ PayPal: luckystudydanit@gmail.com

My profile with reports after closing fundraiser :
https://www.facebook.com/volunt2erua/

also all reports in our πŸš€ channel:
https://t.me/toxicc_squad
Please open Telegram to view this post
VIEW IN TELEGRAM
❀2
🚱 Interview Questions: Function currying

#js #interview #deepClone #patterns

Analysis: Currying of the add function is achieved by recursively calling a function that continues to accept parameters.
Please open Telegram to view this post
VIEW IN TELEGRAM
❀️ Setting Up Jest in Your Angular Project

#angular #tests #jest #guide

Testing lies at the heart of building robust and reliable Angular applications.


βœ… Article link
🎁 Code link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1
❀️ 🀍 Global Error Handler β€” Angular

#angular #error #interceptor

⚠️ The example is for presentation purposes only and can be refactored.

βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1
🚳 Interview Questions: Implement promise.all method

#js #interview #promise

Analysis: Use the Promise.all principle to synchronize the Promise state through the counter and result array.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ–€πŸ©· Angular: Initialize SignalStore from Resolver

#angular #signals #resolver

βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1
πŸ“΅ Interview Questions: Implement Instanceof

#js #interview #instanceof

The instanceof operator in JavaScript can be used to determine whether an object is an instance of another object. However, the instanceof operator has some limitations, such as:

πŸ₯«The instanceof operator can only determine objects directly connected to the prototype chain.
🌯The instanceof operator cannot detect objects with cyclic prototype chains.
Therefore, the above code provides a more general instanceof function that can determine the relationship between any two objects.

The implementation principle of this function is:

πŸ—The function instanceof receives two parameters: left and right.
πŸ₯žFirst, the code checks to see if the number of parameters is 2, and if not, throws an error.
πŸ₯šNext, the code checks whether the left operand left is null. If so, it returns false directly, because null cannot be an instance of any object.
πŸ§€Then, the code checks whether the type of the left operand left is an object. If not, it returns false directly, because only objects can be instances of the constructor.
πŸ₯–Next, the code uses Object.getPrototypeOf() to obtain the prototype of the left operand left and assigns it to the variable proto.
🍞In a loop, the code continues to traverse proto’s prototype chain until proto is null.
πŸ₯In the loop, the code checks whether the prototype of the right operand right is equal to the current proto. If they are equal, it means that the left operand left is an instance of the right operand right and returns true.
🍠If no matching prototype is found at the end of the loop, that is, proto is null, it means that the left operand left is not an instance of the right operand right, and false is returned.
Please open Telegram to view this post
VIEW IN TELEGRAM
❀️ Kickstart your new Angular project: A step-by-step guide

#angular #tailwind #eslint #jest #cypress #husky #guide

Requirements:

For the purposes of this guide, I’m assuming that you already have the following tools/libraries installed on your machine:

1. Node.js (I’m using v. 20.x.x)
2. Git
3. A code editor (I’m using Visual Studio Code), with ESlint, TailwindCSS IntelliSense extensions.


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