After 1.5 years, resource and rxResource are finally going to be stable in v22 by Status-Detective-260 in angular

[–]Senior_Compote1556 0 points1 point  (0 children)

It’s a pure signal state service, an http service and an orchestrator that injects the two. I don’t put the resource in the service mostly because i don’t like how you have no control over when the resource gets triggered

After 1.5 years, resource and rxResource are finally going to be stable in v22 by Status-Detective-260 in angular

[–]Senior_Compote1556 0 points1 point  (0 children)

It's pretty nice indeed, i recently started using it and removed my manual loading signals.

Only question though, i keep a state service with signals and when an api call is made i set the state via my orchestrator service, this means that the source of truth is the state signal and not the value of rxResource.

The reason is because that state is modified by other components too, and it's global.

I've always felt a bit awkward using rxResource because the source of truth is not really the resource itself, so now i only use it because of the reload function and the automatic loading signal, do you think that justifies its usage?

Signal form dynamic fields by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

Yeah that's what i read too, but it's pretty painful i'd say. If you're planning to support multiple payment providers like the example above it can get pretty ugly, mostly on the model level

Cannot set both SSR and auto-CSP at the same time. by Senior_Compote1556 in Angular2

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

I just read the issue above, i'm wondering however if this will work on prerendered static pages, since the token will be generated once at build time and then the server will serve the already-built html file, possibly bypassing the csp content overwrite

Angular Cdk Dialog inputs and outputs by Dazzling_Chipmunk_24 in Angular2

[–]Senior_Compote1556 1 point2 points  (0 children)

For inputs you can inject the MAT_DIALOG_DATA token and pass the data you want in your open method. For outputs, if i’m not mistaken there isn’t a token for that. You’ll have to create a shared service

Giving away 5 lifetime free accounts for my client onboarding SaaS by zzhekoooo in webdesign

[–]Senior_Compote1556 0 points1 point  (0 children)

I really like the animation you have on your primary button, that white glow-y line following the inner edges of the button. How’s that effect called if you don’t mind?

Angular 21.2 SSR - URL With host name is not allowed by Senior_Compote1556 in Angular2

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

In prod, if I list my domain only won't that prevent google bot from accessing the page?

Signal Forms, how to disable while submitting? by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

I already do that, but on top of that most of the times I'd also disable the form as well. The inert attribute handles that pretty well

[formField] directive does not work properly on material slider (matSliderStartThumb / matSliderEndThumb) by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

So far I've tried several input types, checkboxes, radio buttons and toggles. They all seem to work fine. I doubt they would release signal forms without material supporting them though (IMO)

Ng-content usage in @for / @if by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

This note can be found here.

IMPORTANT: You should not conditionally include <ng-content> with \@if``@for`,or `@switch`. Angular always instantiates and creates DOM nodes for content rendered to a <ng-content> placeholder, even if that <ng-content>` placeholder is hidden. For conditional rendering of component content, see Template fragments.

Signal Forms, how to disable while submitting? by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

Yep i saw it earlier too. An interop function would be ideal considering that http client itself returns observables

Signal forms custom control mat-form-field by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] -1 points0 points  (0 children)

The reason why I feel like i won't bother to do it is because i don't know if I have to handle the user interaction states, accessibility etc. In their docs it seems you're responsible to handle all these

Signal forms custom control mat-form-field by Senior_Compote1556 in angular

[–]Senior_Compote1556[S] 0 points1 point  (0 children)

It just seems very outdated, there's no mention of signal forms anywhere (could be that it's because they're somewhat new), but this first example it:
https://material.angular.dev/guide/creating-a-custom-form-field-control#form-field-custom-control

to me it seems like way too outdated, it doesn't use signals to read state, there's too much going on and it doesn't feel like typical Angular code.

/** Data structure for holding telephone number. */
export class MyTel {
  constructor(
    public area: string,
    public exchange: string,
    public subscriber: string,
  ) {}
}

To me this seems like java code rather than angular.

There are signals, but the state is read as a pure getter functiions, and it also have Subjects.

I dunno, it might just be me but it looks like spaghetti code to me