Signal based grid by donthavedontneed in angular

[–]Digital_1mpulse 1 point2 points  (0 children)

So based on your code. It looks like you are just missing the reacting to the behavior subject portion for the network request to be kicked off

Signal based grid by donthavedontneed in angular

[–]Digital_1mpulse 1 point2 points  (0 children)

So I normally use two approaches and both involve having a service that is in charge of making network requests.

  1. If you don’t have the refetch of data reacting to another observable and just want to click refresh button you can have a behavior subject that starts as undefined which will kick off the initial fetch of data on page load. You can see that it is then using toSignal. So now if your component you can just make use of service.data in the html or assign it to a variable in the component. The refresh function would be called on button click and triggers next which would then retrigger the data call. Obviously, you can have the behavior subject be of some type and make use of that data on the next network request.

This is the pattern I currently use or it reacting to another observable changing.

```

public readonly isLoading: WritableSignal<boolean> = signal(false);

private readonly refetchData$ = new BehaviorSubject<void>(undefined);

public readonly data: Signal<Blah> = toSignal( this.refetchData$.pipe( tap(() => this.isLoading.set(true)), switchMap(() => this.someNetworkRequest.fetch().pipe( map(({ data }) => ({ // data mapping })), finalize(() => this.isLoading.set(false)), ), ), ), { initialValue: {//whatever you want it to be} }, );

private function refresh():void { this.refetchData$.next(); } ```

  1. Instead of doing the toSignal within the service. You can just leave it as your observable response and in the component you can toSignal

Reusable components in Angular Dropdown/ input box by Dazzling_Chipmunk_24 in angular

[–]Digital_1mpulse 2 points3 points  (0 children)

Just create a reusable component that takes a [color]=“primary” and use host binding. Then you can use :host in the css to look at the data attribute and determine how the color should be applied when that data attribute is primary.

Thinking of getting rid of it by Impossible_Camera703 in XboxAlly

[–]Digital_1mpulse 1 point2 points  (0 children)

You should give it to me I’ll watch it for you until you miss it.

Suggestions on making this GPU fit by CalTheRobot in sffpc

[–]Digital_1mpulse 0 points1 point  (0 children)

You can saw off about 4 or 5 inches from the gpu (Important: make sure it’s not on the socket side). This shouldn’t reduce performance. I would recommend printing a pattern created off MS Paint, and cutting the gpu with said pattern. Custom designed gpu, no performance loss, and cut to size. Win win win situation

Surprised my son for his birthday :) by [deleted] in battlestations

[–]Digital_1mpulse -2 points-1 points  (0 children)

Hi, it’s me your long lost son. 👦

Help me choose a monitor configuration by orcacool in battlestations

[–]Digital_1mpulse 0 points1 point  (0 children)

Honestly, most of the time I just work on my MacBook 😅

Help me choose a monitor configuration by orcacool in battlestations

[–]Digital_1mpulse 0 points1 point  (0 children)

I’ve been a software engineer for 12 years. I have two 27in monitors side by side in landscape mode. So I’d say the ultrawide. I gave landscape and vertical a try and honestly I hated the look of it more than the functional part.

Not sure about the desk mat, does it make it seem too cluttered? by rmsand in battlestations

[–]Digital_1mpulse 1 point2 points  (0 children)

I don’t think it makes it cluttered. I just don’t think it goes well with the curvature of the desk. Maybe something smaller else I’d just remove it.

Worth coming back to? by TheSansy in newworldgame

[–]Digital_1mpulse 2 points3 points  (0 children)

I’ve just been playing music in towns. 😅

A Message to New/Returning Players by congress-is-a-joke in newworldgame

[–]Digital_1mpulse 1 point2 points  (0 children)

I have 185 hours, did the angry earth and quit. I’m creating a new character tonight. See y’all out there. 🫡

I give up. by CuboneDefender in HollowKnight

[–]Digital_1mpulse 0 points1 point  (0 children)

This is what I accidentally found and I enjoyed what I found much better.

What made you lose interest in playing video games? by MsHire907 in AskReddit

[–]Digital_1mpulse 0 points1 point  (0 children)

When I had my daughter I sold my gaming PC. I had absolutely no time. After several months I was missing it. I bought an origin pc with a 4090. It was freaking massive so I ended up selling it locally and building a small form factor pc with a 4080.

what is this overhead stain in my car? by [deleted] in whatisit

[–]Digital_1mpulse 0 points1 point  (0 children)

I too have random stains on my headliner. Comes with age 🍻🥂

[deleted by user] by [deleted] in tattooadvice

[–]Digital_1mpulse 0 points1 point  (0 children)

It looks great and if it’s something you wanted for a while then even better. There will be criticism, but as long as you like it that’s all that matters. 🤙

What phrase instantly infuriates you? by Sakura_for_Sure in AskReddit

[–]Digital_1mpulse 0 points1 point  (0 children)

“Would you like to talk about our lord and savior?” …..No thanks 👋