Armen Vardanyan
banner
armandotrue.bsky.social
Armen Vardanyan
@armandotrue.bsky.social
GDE for Angular, front-end team lead. I write articles and talk at conferences
Any good resources on steps to upgrade to application builder in v17 without upgrading to v18/v19?
December 16, 2024 at 9:11 AM
Quick question: do you think about a class getter as "derived state"?
December 10, 2024 at 11:20 AM
Did you know you can create #Angular template-driven form groups?

Defining forms is easy even without reactive if you know the details. You can use `ngModelGroup` to achieve the same result:
December 9, 2024 at 12:36 PM
Another just-for-fun question

So, the #RxJS `tap` operator is specifically designed to perform side-effects

However, its implementation is just taking an Observable and returning a new one with the side-effect slapped on it

So, is `tap` itself a pure function or not? 😁
December 9, 2024 at 11:59 AM
#NgRx ESLint ruleset has a rule that prohibits mapping Observables from the store to be mapped in component

Instead, it encourages the use of new, derived selectors and a direct selection of the state

I believe we should not create computed properties from store signals

What do you think?
December 2, 2024 at 3:13 PM
When we make HTTP calls in #Angular, sometimes we need to map the response to something else

With `rxResource`, would you prefer to do it with an #RxJS operator, or with a computed/linked signal?

I prefer doing it with RxJS, but I want to hear opinions
December 2, 2024 at 11:33 AM
Important to remember: while `Resource` implements some methods from `WritableSignal` (set, update), it is not itself a signal.

If you want to bind a resource to `ngModel` in your #Angular component template, use its `value` signal, not the resource itself:
November 28, 2024 at 2:14 PM
I never understood why people would make Facades for #NgRx, I don't get the point.

Isn't NgRx itself already a facade? A big, complex system with which you interact only via two simple methods (dispatch, select)
November 28, 2024 at 12:18 PM
You can call methods of a child component in #Angular templates via a reference variable

Do you think this is a bad practice? If so, how can we avoid it? What would be some cases where this is justified?
November 26, 2024 at 2:24 PM
Not something super hard, but important

#Angular linked signals have the same scheduling approach for computations as regular `computed` properties

Computation does not run initially until the value is first read. Subsequently, only new reads will trigger to recompute
November 25, 2024 at 2:31 PM
I've run into an interesting type issue with #Angular's new `linkedSignal`

Using the previous value argument in computation callback results in an `unknown` type, even when the type returned is super explicit

Any idea why this is the case?
November 25, 2024 at 1:16 PM
My upcoming #Angular v19 article is already under review, and

I'm happy to say exploring the full release docs taught me a lot
Interesting things are coming 🤫
November 25, 2024 at 12:11 PM
I think one improvement to #Angular's Resource API would be the addition of initial values

Sometimes the `request` can depend on optional signals, and we might want an easier mechanism of having some default value:
November 22, 2024 at 11:31 AM
#Angular's Resource API is wonderful

Easily chain HTTP requests that depend on each other:
November 21, 2024 at 1:19 PM
I'm already writing a new article

I will cover all the more obscure features (some of them I already tweeted about) that got a bit overlooked because of the `linkedSignal`/Resource API hype 😁

Will drop next week! 🚀
November 21, 2024 at 12:05 PM
#Angular v19 Resolvers will now also accept a `RedirectCommand`!

We can use it to navigate to other pages depending on the data received, or for handling errors
November 21, 2024 at 11:35 AM
By the way, if you want to update an #Angular signal of an array using an index, the new `Array.with` method can be useful!

It returns a new array instead of modifying the existing one, which is perfect for pure updater functions like `update` callback or reducers:
November 20, 2024 at 12:56 PM
You will be able to provide a `debugName` for signals in #Angular v19

This will become super useful when rich signal debugging tools become available!
November 20, 2024 at 12:03 PM
The new syntactic sugar for app initializer functions is nice!
November 20, 2024 at 10:34 AM
I just updated my personal website 😁
November 20, 2024 at 6:59 AM
What is the ideal maximum length of a single file #Angular component?

I try to limit mine to 120 lines of code, but I have seen more extreme approaches. What do you prefer?
November 19, 2024 at 1:51 PM
Did you know that instead of untracking multiple signals individually in a computed/effect, you can use an untracked callback?

The `untrack` function from #Angular call also accepts a callback, and any signal read in the callback won't be tracked.

We can also return the value from `untracked`!
November 19, 2024 at 11:52 AM
Looking forward to #Angular v19 this week...

...to be able to drop the new big article on `resource`/`rxResource` 😉
November 18, 2024 at 10:11 AM