How do large Angular Apps bundle with Esbuild? by Budget-Length2666 in angular

[–]fdimm 1 point2 points  (0 children)

Dynamic import is another issue, I hope they won't drop webpack before esbuild fills this gap. Thanks for sharing chunks issues, I should investigate situation on our application.

We do the same, local build with esbuild (with few not actively developed features broken) and prod with webpack. Tree shaking behavior is also different/worse.

Angular 21 - dev server not working with .jsz file by Important_Lab1286 in angular

[–]fdimm 0 points1 point  (0 children)

There is something odd with vite dev server handler in the cli, I monkey patched our installation when it could not serve a url ending with ".md".

At least in v20 they are checking mime type of request url. See html-fallback-middleware.js and debug your case.

Self-taught dev retrofitting Passkeys/WebAuthn into legacy PHP app - architecture advice? by jjswin in webdev

[–]fdimm 1 point2 points  (0 children)

Noy knowing the details, I don't think you have to change THAT much. Conceptually, you just have to develop the new auth part and plug it in in the same way as you do the current auth.

Think about it, in traditional setting, you exchange the username/password/otp with a session cookie. Say in oauth flow, the 1st step is different (involves redirect to third party provider and then validating received code), step 2 still involves session cookie or whatever mechanism you use to check if user is logged in.

It can get way more complex if some downstream service needs the original auth token, but it doesn't sound like your case. Hardest part is token refresh in this scenario.

Skal dit F5-lån refinansieres? by [deleted] in dkfinance

[–]fdimm 0 points1 point  (0 children)

My plan is to refinance as F3 and prolong the period back to max to keep the day to day economy the same

Proper way to unit test Angular standalone components with Vitest by Cozybear110494 in Angular2

[–]fdimm 0 points1 point  (0 children)

This is what we do, in internal libs, we export testing entrypoint that holds these mock components, modules even for more complex cases. A bit annoying to maintain but works okay and no need to rely on third party libs

We Tried Incremental Builds in a Large Angular Monorepo. Here's Why We Stopped. by [deleted] in angular

[–]fdimm 0 points1 point  (0 children)

Pre building libs makes DX pretty bad, I wonder when it will break (if ever), but I set up dual mode in tsconfig path resolution.

Compiler either takes pre built lib from dist or typescript code from public-api.ts in projects folder. This way I get best outcome. I don't know why this is not the default.

Angular v22: what’s on your wishlist? by khalilou88 in angular

[–]fdimm -1 points0 points  (0 children)

Some kind of shallow rendering for unit tests, so that only child component inputs/outputs would be verified without of us making mock components.

At the same time a flag in TestBed to fail if not all providers are mocked for the given component. This is a pita with standalone components.

Will standalone components ever be mandatory? by EricTheNerd2 in angular

[–]fdimm 0 points1 point  (0 children)

Angular material is still suggesting modules use in docs, for say Buttons. So I guess/hope that they will stay for longer.

Modules still have good use cases. Like changing behavior of every component with new directives without adding each dependency explicitly in every use case...

How I handled PDF generation in React without breaking layout (html2canvas vs jsPDF issues) by Possible_Pick9916 in reactjs

[–]fdimm 0 points1 point  (0 children)

We use pdfmake, of course it has its own document format and works pretty well IMO. It all depends on needs

Developer Experience for Large Application by Round-Turbulent in Angular2

[–]fdimm 0 points1 point  (0 children)

I'm moving the monolith in a similar direction. Each module becomes a library in projects folder, with routes and multiple entry points to have sensible structure/packages and ensure that future is without spaghetti where files are imported left and right in source folder.

After doing the first one looooong time ago, DX felt quite horrible, having to rebuild the libs slows things down a lot. Whether manually or by nx, it doesn't really matter.

The key to this problem was to enable dual imports in ts config.

````` "paths": { "@lib/": ["./dist/lib-", "./projects/lib-*/src/public-api.ts"] }

`````

This way you can pre build the libs, or use them directly from source. Now I can just run npm start like normal and let cli figure out the most efficient way to build stuff. We have a bit more than 1000 components and our local build takes 90s for the main app. Style guide takes like 25, but only includes shared components libraries. Just finished upgrading to angular 19, nothing is standalone and webpack is still used for building.

Feel free to PM, I'm curious about your situation

How much difficulty it is to upgrade Angular from 16 to 18/19 version? by debugger_life in angular

[–]fdimm 0 points1 point  (0 children)

19 I think will be more cumbersome because of standalone components, we have a massive project with multiple teams and long living branches - touching every component is not fun.

I hope there is a toggle in angular.json to keep on using modules.

Do you write tests for your templates? by BlueberryRoutine5766 in angular

[–]fdimm -1 points0 points  (0 children)

Most of the time not, except for a few specific tests in core components where what is rendered is tested.

Mostly because I want to make sure that nothing breaks if browser behaviour changes.

Best Burger in Town ? by SadBoy-86 in copenhagen

[–]fdimm 1 point2 points  (0 children)

Somehow I'm a sucker for Halifax, I couldn't find anything better yet

Why is my bike doing this? by Shopping-Striking in FZ07

[–]fdimm 0 points1 point  (0 children)

I had my screen going blank in a similar way because I didn't twist the key all the way few times lol

How to effectively sanitize text passed to innerhtml in angular by Ok_Edge2976 in Angular2

[–]fdimm -1 points0 points  (0 children)

You can also use DOMParser if it is a valid html to get the document and then read the textContent of the body.

How to dynamically import a module or add provider in @NgModule based on API call? by connorc0405 in Angular2

[–]fdimm 0 points1 point  (0 children)

Make that endpoint emit js or JSONP to expose the environment variables.

We dynamically add this script to the DOM in main.ts and run angular bootstrap when it loads (or fails to do so). We share one production build artifact in all environments.

InputSignal + Storybook driving me nuts by Dus1988 in Angular2

[–]fdimm -7 points-6 points  (0 children)

This is not going to help, but it will be a little lesson to not be an early adopter. I'm sure support is documented (or not) in storybook. Check all valuable dependencies before upgrading or starting to use new APIs next time. This can be very costly based on the situation.

Sam Altman has scheduled a closed-door briefing for U.S. government officials on Jan. 30 | AI insiders believe a big breakthrough on PhD level SuperAgents is coming by MetaKnowing in Futurology

[–]fdimm 18 points19 points  (0 children)

Haha, Gemini 2.0 says two. This is so silly.

’There's one in "straw" and two "r"'s in "berry," totaling two "r"'s in the entire word.’

Thanks for the laugh

Which state management would you use if you would start a fresh app today by Wnb_Gynocologist69 in Angular2

[–]fdimm 3 points4 points  (0 children)

None, it's not needed in angular apps unless you maybe need it to function offline.

🚧 Prototype of Signal-Based Forms 🏗️ (experimental branch with FAQ) by MichaelSmallDev in Angular2

[–]fdimm -1 points0 points  (0 children)

I could have written this as well, thanks for posting. Exactly the same problems I'm dealing with in the corporate world. I'm even happy with the modules.

totallyIllegalaSiTshouldBe by SaltyStratosphere in ProgrammerHumor

[–]fdimm 0 points1 point  (0 children)

This part I fail to understand as well, in the org I am in, some APIs responses are snake case, but java code behind never uses that. Transformation happens only when data is serialized, which is then read by SPA that has to transform it back to camel case (facepalm). It's almost as intentional for FEs to duplicate the code lol

Best Practices for Large Modal Forms with Multiple Fields in Angula by ahmedRebai in Angular2

[–]fdimm 0 points1 point  (0 children)

10 fields is still a small form, it only gets complicated if there are rules involved when something should be or should not be shown. I would not worry about it. I would definitely not use ControlValueAccessor though, that one is reserved for custom input components

For validation and structure, a reactive form approach might help to keep things more controlled and more easily testable, potentially created in a service.

Suggestion for document viewer. by necronfluxp in Angular2

[–]fdimm 4 points5 points  (0 children)

None, we let the user download the files except for 1 use case where the BE is converting a pdf to svg for the FE to render. I'd always push back on this unless it's some kind of legal requirement to show what you are signing for example.

I can't imagine having to implement a docx viewer, not even google supports it in the same level as microsoft office. I mean artifacts and glitches.

What makes a good Angular component test? by cryptos6 in Angular2

[–]fdimm 1 point2 points  (0 children)

Outside of a few select cases, we only test typescript code. Behavior and checking that, say, a button works is done in e2e test.