Armen Vardanyan

Armen Vardanyan

@armenvardanyan.dev

GDE for Angular, front-end team lead. I write articles and talk at conferences

234 followers221 following618 posts

Pinned

View full thread
View full thread

TanStack Query was doing what resources do today long before resources existed; it was primarily popular with React projects, but the Angular port exists and is very powerful.

The idea is generally the same, but it also allows caching of requests by key. And in the Angular version, signals can also be parts of the key. In the example below, ['books', 2] is the key, the value will be refetched anytime the key changes

Since security continues to be the number one topic in software right now, it is important for me to continue to say that frontend apps are NOT excluded from having vulnerabilities

View full thread

Since security continues to be the number one topic in software right now, it is important for me to continue to say that frontend apps are NOT excluded from having vulnerabilities

View full thread

- A sanitization bypass in host bindings (Medium). This is the one that also affects apps without SSR - Logged-in responses leaking through HttpTransferCache (Medium)

Since security continues to be the number one topic in software right now, it is important for me to continue to say that frontend apps are NOT excluded from having vulnerabilities

View full thread

Another SSR one: if user input shapes a URL you pass to `HttpClient`, a URL that looks same-origin can still be sent to another server, along with your server's auth headers

Since security continues to be the number one topic in software right now, it is important for me to continue to say that frontend apps are NOT excluded from having vulnerabilities

SSR could be hung with a single malformed DOCTYPE in user-supplied HTML, pinning the server at 100% CPU. Fixed in 20.3.31, 21.2.23 and 22.1.6. Angular 19 and older will not get a fix

One thing people may struggle with in signals (and, subsequently, NgRx Signal Store) is that signals, ultimately, are wrappers around values (so, objects) This means all the object reference things and gotchas apply. See here: #Angular #NgRx #Signals #WebDev

Do you know the difference between switchMap, exhaustMap, mergeM... wait, it does not matter. I believe there is an operator missing in RxJS Say you want to auto-save a document when the user types edits into it.

You want to send a save request when they change anything (could be a big change like a pasted paragraph or just one symbol), you want to hold off new changes while the request is in-flight, but when it is done, you want to save the new FINAL result (everything changed since then).

What operator would you choose? I would use `auditMap`, but there is a slight problem: that operator does not exist! It is, however, quite easy to build by combining a `throttle` and `concatMap` and creating a deferred Observable out of them: #Angular #RxJS #TypeScript #WebDev

I know a lot of people who want to start building AI agents, either for themselves or as products for other users/businesses. I personally started with Google ADK and am very content with it (even did two livestreams about it), so maybe I should cover a bit here too

View full thread

I know a lot of people who want to start building AI agents, either for themselves or as products for other users/businesses. I personally started with Google ADK and am very content with it (even did two livestreams about it), so maybe I should cover a bit here too

View full thread

So far my favorite thing for building agents, another cool framework from Google (yeah Angular brought me here) To learn more you can watch my livestreams:

I know a lot of people who want to start building AI agents, either for themselves or as products for other users/businesses. I personally started with Google ADK and am very content with it (even did two livestreams about it), so maybe I should cover a bit here too

View full thread

I know a lot of people who want to start building AI agents, either for themselves or as products for other users/businesses. I personally started with Google ADK and am very content with it (even did two livestreams about it), so maybe I should cover a bit here too

You can also create agents for specific workflows, like fixed `SequentialAgent`-s, working concurrently with `ParallelAgent`-s or iterating using `LoopAgent`-s

Okay everyone, time for me to talk about TanStack Angular! For quite a long time tools like React Query were dominating non-Angular frontend frameworks, but since TanStack became available, we can use its full power in our Angular apps

Resources cover most of the "HTTP request" functionality, but not mutations, and TanStack also has so much more to offer: database, store and even AI integrations! Join me this Wednesday to explore TanStack in Angular together! #Angular #TanStack #WebDev

I used to say that you should compact (or switch to a new session) at around 30-40% of context window, but with Opus 5.5 you can pretty much go for 80% or even more. Argon also keeps stable for very long sessions. I would revise my advice to 50% at worst, maybe 60. #AI #LLM #AIAgents

Funny thing how the `defer` keyword evolved to also work for incremental hydration. SSR is the most underrated Angular topic though, I feel. Is anyone actually building server rendered apps right now? #Angular #WebDev #SSR

No shade on the authors at all, it is actually a very well designed skill, but it focuses too much on the current version (and I know you people never update your skills lmao)

I've met people who have no idea what the Ivy compiler is Not because they're "bad developers" But because they started working with Angular at around version 15 For them the Ivy compiler is just... the compiler A bit mind-blowing 😬 #Angular #WebDev #JavaScript

My favourite genre of stupid LLM posting is accounts making tweets about papers that they do not understand, and very often the papers do not even make the point they think they do #AI #LLM #MachineLearning

Is autofocus meant to be this hard? You need `afterNextRender` with a manual injector, and `viewChild` Of course, easily fixable with a directive... can you make one? #Angular #WebDev #TypeScript #a11y