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
πŸ“„ Debounce decorator in Angular

#angular #decorator #debounce

⚠️ Third-Party Lib

Usage example:

@Component({...})
export class ExampleComponent {

@Debounce(1000)
execute(arg: unknown) {
[ ... ]
}

}

βœ… Article Link: https://blog.bitsrc.io/3-ways-to-debounce-http-requests-in-angular-c407eb165ada
❀1
πŸ“„ Card Composite via @ViewChildren in Angular

#angular #decorator #ViewChildren

Imagine the following requirements for your Angular app:

- Your customer wants a view that displays multiple cards at once.
- A button at the top of the page should toggle the edit mode.
- While in edit mode, all cards are editable at the same time.
- As soon as you click β€œsave” only those cards that actually have been edited are going to send a request to the server.
- If you decide to discard the changes by clicking on β€œcancel” all cards should be reset to their initial state.

This is a common scenario in any more sophisticated web application. Nevertheless, I just recently discovered a very handy way to handle those requirements in Angular. In this article I want to share my solution, leveraging the
@ViewChildren property decorator to implement the Card Composite pattern.


βœ… Article link: https://blog.stackademic.com/card-composite-via-viewchildren-in-angular-aa3317f92f82
πŸ‘2πŸ”₯1
πŸ§ͺ Attribute Injection in Angular: The HostAttributeToken Approach

#angular #decorator #attribute

Angular offers the @ Attribute decorator, facilitating the injection of attributes from the host node. It proves particularly handy when there’s no necessity to establish a binding.


🚩 > Angular 17.3

βœ… Article link
πŸ‘1
πŸ€“ Replacing Static Inputs with the Host Attribute Token

#angular #decorator #Attribute #HostAttributeToken

🚩 > Angular 17

βœ… Article link
πŸ‘1