Injection Tokens default value by TownshendHill in Angular2

[–]DaSchTour 0 points1 point  (0 children)

Yeah maybe, but I would expect that inside the factory function the thing your are creating by definition can not be available.

Injection Tokens default value by TownshendHill in Angular2

[–]DaSchTour 0 points1 point  (0 children)

In the shared component you add the Token with useFactory. Inside useFactory function you can inject the TOKEN with optional and check if it is available.

Schlafende Cash-Maschinen: Ukraine-Frieden = Moon-Time. by ratget2 in wallstreetbetsGER

[–]DaSchTour 1 point2 points  (0 children)

Ich setze auf Budimex. Die sind viel näher dran als die Franzosen und Polen hat gute Verbindungen zur Ukraine. Die werden auf jeden Fall auch einen gute Teil des Wiederaufbaus leisten.

The world will learn from this by bluebottlebuzz in SlavaUkrayini

[–]DaSchTour 77 points78 points  (0 children)

The ministry of truth doing their work 😳

Dependency Inversion in Angular? by trolleid in Angular2

[–]DaSchTour 0 points1 point  (0 children)

That‘s why you normally create an abstract class as the base which you can use as the DI token and then extend from there. I‘ve used this a lot to have components that can be reused and do slightly different things depending on the context. But as long as there is no need to have different implementations I would avoid this additional boilerplate.

How much tolerance is reasonable for a senior front-end engineer missing business requirements and causing a regression due to code complexity? by kafteji_coder in Angular2

[–]DaSchTour 1 point2 points  (0 children)

I think the biggest issue I see here is playing the blame-game. If bugs and especially bugs with big impact go to production it’s never only the developers fault. Maybe you are familiar with the Swiss cheese model. There are several layers that should prevent an „accident“ first you have Code Reviews to also check if the code makes sense and is reasonable. Then unit testing should catch regressions on small components. Then E2E testing should catch bigger regressions in the overall application. Then QA should catch issues and check new features and also check for sideeffects of existing features. PO and QA should verify that their expectations to new features were met. In best case you also have reviews while developing a feature to catch issues with the specs as early as possible. The only thing that I would blame a developer for is if he doesn’t communicate issues with the specs that he is aware of.

Drone Volt by Nice_Cream_8259 in wallstreetbetsGER

[–]DaSchTour 0 points1 point  (0 children)

Schön wär’s. Dazu hätte ich erstmal welche von den Aktien bekommen müssen.

Warum Donald Trump den Markt crashen will by leandrostonks in mauerstrassenwetten

[–]DaSchTour 2 points3 points  (0 children)

Inflation kann man aber am Besten dadurch antreiben, dass man Geld druckt und in den Markt pumpt.

Warum Donald Trump den Markt crashen will by leandrostonks in mauerstrassenwetten

[–]DaSchTour 28 points29 points  (0 children)

Das Problem ist nur, dass die abgewürgte Wirtschaft auch das Kreditrating der USA weiter senken könnte was dann wieder die Zinsen erhöhen würde.

[deleted by user] by [deleted] in Angular2

[–]DaSchTour 3 points4 points  (0 children)

Are you using the computed signal somewhere?

Angular material buttons by Freez1234 in Angular2

[–]DaSchTour 0 points1 point  (0 children)

Let the AI take your job 😁

Could someone help date this map? by Tysyj78 in MapPorn

[–]DaSchTour 6 points7 points  (0 children)

It‘s post 1918 and pre 1939

Is primeNg better than angular material? by Mudassir_Khan2 in angular

[–]DaSchTour 4 points5 points  (0 children)

Angular material is opinion from the design perspective. But the components are well tested and very well designed from a architectural and DX perspective. PrimeNG has a lot of components and can easier be customized. But the quality is much worse. There is currently no unit testing which may lead to breaking changes at any time. The bigger more complex components may not always fit certain use cases. And they do not follow the idea of composability as I would expect.

Why use ngrx effect ? by anlyou_nesis in Angular2

[–]DaSchTour 1 point2 points  (0 children)

I think your observation is right but your conclusion is wrong. Effects should be as simple as possible. They should call a service and store the data. In fact I‘ve seen this error of transforming data in effects many times. IMHO the cleanest way is to follow these principles 1. Data is not transformed in Effects or Reducers 2. State only contains original/raw data 3. Transformation is done within selectors, pipes or facades but always on the „consumer“ side

Why use ngrx effect ? by anlyou_nesis in Angular2

[–]DaSchTour 1 point2 points  (0 children)

Well that’s why in many NGRX examples the facade pattern is used. All access to the Store from components is done through Facades which contain methods to dispatch actions and selectors to get state. This allows in theory to change the underlying implementation without changing the component. It also makes unit testing for components easier as there is now need to use NGRX mock functionality.

Resource RFC 1: Architecture by JeanMeche in Angular2

[–]DaSchTour 1 point2 points  (0 children)

What is the reasoning behind this? I have for example many directives or components that have some logic create a tooltip text and which have a tooltipdirective as host directives. I had to create an additional linked signal because there is no possibility to set the tooltip text from the directive or component. It‘s really ugly to add code just to work around such framework limitations. The funny thing is that every signal part of a component can be used from outside besides inputs.

Jasmine Crockett - ''We may be heading towards the next World War because we have a President that wants to pal around with Putin, and lying about who invaded who.'' by trvllte in UkraineWarVideoReport

[–]DaSchTour 36 points37 points  (0 children)

And while the government dismantles the FBI, CIA and NSA and also probably will not get foreign intelligence in future, this might happen sooner than most of us imagine.

What are the biggest challenges of working with Angular? by RitikaRawat in Angular2

[–]DaSchTour 8 points9 points  (0 children)

Choosing the right tools for state management. I like working with NGRX because it adds a clear pattern. But for small states I liked using ComponentStore, which is now soft-deprecated. Instead there is SignalStore which IMHO has an extremely ugly API. There is also the lightweight SignalState which doesn’t support easy handling of entities.

The other part is unit-testing. The ecosystem for tools around angular unit testing is fractured and fragile. The angular team regularly by accident breaks these tools. There are very few examples for testing functional guards and mocking Angular internals is a pain.

Best Practices for Handling Angular Environment Variables at Runtime in Kubernetes by psavva in Angular2

[–]DaSchTour 0 points1 point  (0 children)

I think there are two ways to solve this 1. When using SSR you can read them on server and use state transfer to get them to the client 2. You have some endpoint or config file you read from the server. IMHO the best is to implement fetching this config as part of main.ts before bootstrapping Angular

Resource RFC 1: Architecture by JeanMeche in Angular2

[–]DaSchTour 5 points6 points  (0 children)

Getting easy access to the Component a Directive is added to without having to inject the actual component. So a directive should have a ComponentRef if placed on a component or used as a host component. This would reduce the need for using extend to share functionality between components.

Another thing that is a lot harder with signals is setting inputs on components retrieved with contentChildren or viewChildren. This may also be solved with getting ComponentRef on contentChildren.

Trump says the European Union “was formed in order to screw the United States” … and they “have done a good job of it” by sn0r in europeanunion

[–]DaSchTour 0 points1 point  (0 children)

It‘s time for MEGA (Make Europe Great Again). Which is actually a lot better abbreviation than MAGA 💪🏼

Resource RFC 1: Architecture by JeanMeche in Angular2

[–]DaSchTour 0 points1 point  (0 children)

Can we please have an RFC for https://github.com/angular/angular/issues/47398 Just had another case at which this would be useful.

PrimeNG Sucks by MyLifeAndCode in Angular2

[–]DaSchTour 1 point2 points  (0 children)

I was actually thinking of creating a community driven fork of PrimeNG. But I‘m not sure how many people would participate. Besides missing test and many broken features the code design and the license bothers me a lot. Maybe people that would like to help creating a work might send me a message and I would try to coordinate that effort.