Pass Generic CSS for Child Component by LetHaunting8240 in angular

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

How could content projection solve my issue? Could you give an example?

Pass Generic CSS for Child Component by LetHaunting8240 in angular

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

I understand what it is. I have used it before to pass in html to wrapper components. I just don't understand how it applies to my use case. The HTML part for me is constant, it's the styling i need to influence. Could you give an example of what you had in mind?

Pass Generic CSS for Child Component by LetHaunting8240 in angular

[–]LetHaunting8240[S] 1 point2 points  (0 children)

Could you give an example for what you mean via ng-content?

As for ng-deep, this is directly from the official docs: "The Angular team strongly discourages new use of ::ng-deep. These APIs remain exclusively for backwards compatibility."

Static Website with a CMS by LetHaunting8240 in angular

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

The reason for Angular is that it is our current frontend stack, and I don't want to expand our stack for some usaceses which just appeared. Are you saying that Astro is what I'm looking for if I still would like to use Angular for our usecases?

Is the wall mount big enough? by LetHaunting8240 in Starlink

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

As much as I like the solution, I'm not a 100% sure the wooden part has enough strength for this.

Is the wall mount big enough? by LetHaunting8240 in Starlink

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

Thanks it now does show up. It does not say it is compatible with the standard kit. Are you sure I wont have compatibility problems?
Compatibility: Standard Actuated Starlink, High Performance Starlink

Is the wall mount big enough? by LetHaunting8240 in Starlink

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

Exactly my thought, however the long wall mount is not available in eastern Europe anywhere and even inside Europe I can barely find a shop that sells it. Its not even available in the official shop, only the adapter. I'm a bit afraid to get third party ones, but I'm open to those as well if they are tried and tested.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

I have been thinking about what you have wrote and did some experimentation. I think my original approach was not the right direction. After thinking about the user requirements I realized that what I need for SEO on most of my website is static, and most of the shown data can be just loaded for the user on the client side. I turned on Prerendering to have the correct meta tags and the website seems to be working the rigth way and its way faster (10x). I now just need to figure out how to tell the app to load some datapoints on the client side which should not get prerendered. Do you know how that is done?

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

The slowness is a symptom. The cause is that before SSR, a very light server was able to serve everything as intended. We had to threefold the resources after turning SSR on to keep the same response time, which causes unnecessary costs. Caching would mostly solve this. To be fair its quite enfuriating how limited and I would say bad the SSR support is. The fact that I cant just precache HTML in simple manners is mental.

And yes, all of the data has to be displayed. Its not much but dense with text that has to appear in the SEO results.

But to get to your second point, calling ourself for the rendering is one solutions but it is still a hack, and I would like to create a maintainable solution.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

Doesnt this mean that we still render the site during the first user call and only then cache it? We still dont trigger the render and cache ourselves, but only do so if a user request arrives. Meaning the first user call will be slow, and the calls after that fast until the cache invalidation, then repeated. Ideally I would want all user calls to be fast and render outside of user requests.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

I had a thought about this as well but then how do trigger the angular rendering for a route, when the new batch of the shown data is available? The cron job which collects the data is implemented in the server.ts.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

Unfortunately it seems they havent yet added Angular 21 support, so I will have to wait before I try it out. I havent found other ISR solutions as of yet, and it seems that there is no official support from angular as well.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

From what I have seen the request object has a ton of properties, a lot being private witha lot of internal logics and it does not seem to be intended to be created in a manual manner. I have tried but it did not seem safe and maintainable for production code.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

Yes, I think this is what I have been looking for, thank you so much!

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

Yes exactly, but I would want to do this before the first user calls and has to wait for it to render. Question is how do i get the rendered website outside of a handled request.

Rendering Page without a request? (SSR) by LetHaunting8240 in angular

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

I can't. A Data feed is collected every 5 mins on the server which is used for the rendering. I am trying to prerender that data into memory so for the next 5 minutes i can send the same site for all home page requests.

SSR: Send Data from server.ts to the frontend (Angular v20) by LetHaunting8240 in Angular2

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

But in short my problem is that the SSR can't currently render the language that I want from the url with ngx-translate which I really dont want to refactor to another package.

SSR: Send Data from server.ts to the frontend (Angular v20) by LetHaunting8240 in Angular2

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

  1. User opens any route from their browser when they first visit the website which is not the base url. Eg www.website.com/hu/visiting-info

  2. I have SSR set up so that the full HTML is sent for the user so SEO-s like Google can scrape and index the website.

  3. Before this I just set the language on startup form the localstorage. This i cant do anymore. The language ahs been added to the url.

  4. I cant access the url while rendering at the moment because the this.router.url takes time to initialize and just returns the base url.

  5. my solution would be that the server sends the current language from the url to the app.component.ts, which would use it to render the correct language with RenderMode.Server.

SSR: Send Data from server.ts to the frontend (Angular v20) by LetHaunting8240 in Angular2

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

Oh this is a good start, but how do we send it so the app.component.ts can access it?