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
πŸ†š CSS New Features

#css #guide #info

This is a list of the new changes (more details below):

β€” Changes to attr() function: so it can be used with any attribute and in any CSS property (not only on content).

β€” calc-size() function: use intrinsic values such as auto or min-content in calculations.

β€” New first-valid() function to avoid issues with custom properties with invalid values.

β€” New *-mix() family of functions with a new notation for ratios.

β€” New *-progress() family of functions to calculate the progress ratio between a range or within a media or container.

β€” Randomization with new random() and random-item() functions, to return random values from a range or list (finally!)

β€” New sibling-count() and sibling-index() functions that provide integer values to operate depending on the order and size.

β€” New toggle() function for styling nested elements easily cycling over a list of values.

β€” New functional notation for arguments with comma-separated lists of values, to avoid ambiguity with the comma separating the arguments.

β€” New URL modifiers to provide more control over url() requests.

β€” Extension of the position type to allow flow-relative values.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5
πŸ“΅ JavaScript Promises: 8 Practical Use Cases

#js #promise

βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❀2πŸ‘1
🚳 JavaScript Design Pattern: Builder

#js #patterns #ui_element

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

#angular #preload #preloading #PreloadingStrategy

Angular comes with two built-in preloading strategies:

β€” NoPreloading (default): Disables preloading entirely. Lazy-loaded modules are only fetched when the user navigates to them.
β€” PreloadAllModules: Preloads all lazy-loaded modules in the background after the initial app load. This is ideal for smaller applications with limited routes, where preloading everything won’t overwhelm the network.

β€” Custom Preloading Strategies: Taking Control of Performance

Angular allows you to define custom preloading strategies to preload specific routes based on your app’s requirements. This gives you fine-grained control over which modules should be loaded in the background and under what conditions.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘3
🌐 Angular: Go Zoneless

#angular #ngZone #zoneless

Why Zoneless?

Well, isn't it clear after those pictures? …In my opinion it might look clear, but this isn't the only advantage, there are others:

β€” Better performance: ZoneJS uses async task as indicators for change. It doesn't directly know when and where exactly the change has happened. You can imagine that it is a system that always runs and is checking everything, everywhere with some exceptions such as OnPush strategy etc.

β€” Debugging: We all know the Expression Changed After Checked we've all been there. Now the stack trace and errors will be more straight forward.

β€” Better feeling from the app: I haven't found the right words, but it just feel better. It feel better that when you change a property with async/await or using .signal(). Then the change appears immediately in the correct spot.

β€” Zone.js was the reason not to develop an App in Angular: Imagine you were building a snippet that was checking user interaction. For example you wanted to calculate how many times is user performing some event such as clicking, touching or interacting with keyboard -> in such scenario your app would go crazy with Angular and you would have to have a lot of components running out of Zone and manually trigger change detection. Otherwise your app even with OnPush strategy could freeze.


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