Angular Munich – Telegram
Angular Munich
180 subscribers
554 photos
41 videos
9 files
705 links
Stay up to date with Angular Framework ;-)

Need more: https://linktr.ee/ngxsamurai
Download Telegram
Handling files with ease using the new Angular file loader options 🗃

In Angular 17.1, the team introduced new loader options that streamline file handling. Here's what you need to know:

📁 Text Loader (text): Convert file content into strings, perfect for those text file transformations.

🔢 Binary Loader (binary): Transform binary files into Uint8Array, essential for handling intricate binary data.

🖼 File Loader (file): This option keeps files separate and allows users to easily access their runtime locations. It is especially handy for managing assets efficiently.

🔲 Empty Loader (empty): Exclude files from your bundle, keeping your project lean and mean.

Configuring these loaders is a breeze! Let me walk you through it. Say you want to inline SVG content directly into your application. Here's what you need to add in your angular.json:

{
"options": {
"loader": {
".noscript": "text"
}
}
}
⬆️ Voila! This setup seamlessly inlines SVG files as strings, eliminating the hassle of external file requests for your graphics. Imagine the boost in performance and user experience!

To ensure TypeScript plays nice, especially with custom loaders like for SVG files, include a type definition file in your project. Simply add a file (e.g., src/types.d.ts).
🧙🏻‍♂️ A Gentle Introduction to Generics in Typenoscript.

One of the more advanced topics in Typenoscript is Generics and understanding and adding them to your Typenoscript coding toolbox can be very powerful. As we continue with our journey of learning Typenoscript and building amazing projects, we want to have more and more tools that we can use to make our job easier, without making compromises when possible.


https://dev.to/this-is-learning/a-gentle-introduction-to-generics-in-typenoscript-3ap3
🧙🏻‍♂️Backdoor in upstream xz/liblzma leading to ssh server compromise (CVE-2024-3094)

- https://www.openwall.com/lists/oss-security/2024/03/29/4

- https://news.ycombinator.com/item?id=39866092
Angular Munich pinned «https://angular.love/en/2023/11/28/angular-styles-masterclass-2/»
🛑 Avoid using detectChanges() 🛑

"But what if no event will schedule a CD cycle?"

Congrats.

This is the ONLY case you need it for.

In the Template use reactive variables.

- Observables
- Signals


Let them do the work for you.

Have a non-reactive variable?

- markForCheck() should be enough in most cases

#angular
🧙🏻‍♂️ 5 harsh truths about workplaces no one will tell you!

1. They call you family, but they don’t mean it

Family members are irreplaceable.

But as soon as an employee leaves a company, they issue a new JD to replace them.

So no, don’t fall for the “family” tag.

2. They don’t want you to become a leader

They need people to boss over and get work done from.

If you become a leader, who will do their work?

3. Remote work is not a perk.

It means 24*7 work.

If you work remotely, it’s important you create your work boundaries and remember that work is not your whole life. It’s only a part of it.

4. Most bosses are micro-managers not leaders

Managers will manage you, leaders will help you grow.

Very few companies have great leaders - and you are very fortunate if you work under one of them.

5. They think money can buy everything

Flapping a big pay-check isn’t going to solve bigger problems like - toxic workplace, poor managers, bad culture, terrible work-life balance etc.

(c) sahaschopra
It's all too easy to get confused about Extract/Exclude vs Pick/Omit.

Here's a little cheatsheet.

(c) mapocock

#typenoscript #ts