182 questions
0
votes
1
answer
59
views
How to send cookies from server to client during SSR (Angular 20)
I am using HttpOnly Cookies for JWT authentication in my Angular v20 app. I have SSR enabled.
During Login, the cookies are sent to the client. I have an HttpInterceptor that seems to work to forward ...
1
vote
0
answers
40
views
How to setup Angular SSR+localize with subdomain-based locale resolution
If build&deploy non-ssr localized versions as subdomains like
en.example.org
uk.example.org
fr.example.org
angular.json configuration looks like
"i18n": {
"...
0
votes
0
answers
60
views
Is it possible to use the AngularNodeAppEngine and dynamically provide the CSP nonce to Angular?
I'm using Angular SSR (@angular/ssr) with the AngularNodeAppEngine for server-side rendering.
I\ve set up a strict Content Security Policy (CSP) that requires using nonces for inline scripts and ...
1
vote
0
answers
191
views
Fix for ngx-translate Angular 20 getBrowserLang default text flash
I'm currently working on an Angular 20 project with Server-Side Rendering and the ngx-translate library.
I've already read through the ngx-translate docs and found this about fixing UI glitches when ...
1
vote
1
answer
84
views
Resource called twice in SSR Application
I'm working with a SSR Angular 20 and noticed Resource could be called twice :
Here's an example of the code:
Service:
code = signal<string | undefined>(undefined);
authCode = resource<
{ ...
1
vote
2
answers
319
views
Angular ReferenceError: document is not defined
Note: My knowledge of JS frameworks and TS is essentially non-existent.
I'm trying to create an SPA with SSG. I have a main component I'm trying to display a webAMP in. Which needs to access document. ...
2
votes
2
answers
119
views
Angular/Supabase project will not load upon "ng serve," causing infinite rendering
I have been working on a login feature for a website I am making using Angular and Supabase.
I have two separate services, one where the Supabase client is initialized, and another where ...
1
vote
1
answer
187
views
Why are components' imports not loading in Angular 19 SSR?
I've run into a problem that my header's imports are not loaded properly in SSR.
In my Angular 19 application the app.component.html includes a static <app-header> component that should exist on ...
1
vote
1
answer
54
views
Why does my Socket.IO connection prevent my Angular component from reloading?
I have an Angular component that connects to a Socket.IO server. However, when I include the WebSocket connection code, my component fails to reload properly. If I comment out the Socket.IO code, ...
0
votes
0
answers
63
views
NGXS with SSR leaks user data between other users
Im using NGXS for state store in angular. While testing I had firefox logged in and launched chrome in private window. When I navigated, I saw that the ssr was flashing the other user's information ...
0
votes
0
answers
46
views
Angular Universal SSR not rendering API content in production (Nginx + Laravel API)
I am working on an Angular 15 application with Universal (SSR). Locally, everything works fine, but in production, the SSR content is not rendered correctly.
Setup:
Frontend: Angular 15 with Universal
...
3
votes
1
answer
1k
views
How can I use Angular 19 SSR with Docker?
I created a fresh Angular 19 SSR app and I would like to use it with Docker.
But I faced a lot of issues.
Dockerfile:
FROM node:23
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm ...
0
votes
0
answers
52
views
Angular SSR creates mismatch between classes and their instances in prerendering
This doesn't happen in development ng serve only in production when I run the node script produced by ng-build in the server folder.
When I try to check type of an object, i.e. myObj instanceof ...
0
votes
1
answer
189
views
Angular 19 SSR - NG0507
i have a Angular 19 SSR Website with provideClientHydration(). If i Activate this feature, i get NG0507 error. But i'm not able to figure out whats going wrong.
If i watch the Website with Inspector i ...
1
vote
2
answers
240
views
ReferenceError: alert is not defined
when I try to execute my function showWelcomeMessage() via the constructor,
I get the error ReferenceError: alert is not defined. What could be the issue ? Im using Angular 19 in VS Code. I also want ...
0
votes
1
answer
808
views
How to Deploy an Angular 19 SSR App on AWS Amplify?
I have built an Angular SSR app using Angular 19, and I'm trying to deploy it on AWS Amplify. Below is my setup and the challenges I'm facing:
Package.json
{
"name": "ssr-app",
...
0
votes
0
answers
182
views
Angular SSR does not include SEO on the page source
I've been doing some tests for a page where I'm trying to implement SEO, but my SEO tags seem to not be inserting into the Page Source only in the inspector which is already client side.
I've tried it ...
1
vote
1
answer
927
views
Whats the best approach to set LOCALE_ID in an i18n SSR Angular 19 app?
Whats the best approach to set LOCALE_ID in an i18n SSR Angular 19 app?
I can set it on the server (app.server.config.ts) by setting this DI token:
{
provide: LOCALE_ID,
useFactory: () => {
...
1
vote
1
answer
834
views
How to Use window, document, location in angular SSR application
I have just created a simple Angular SSR application using Angular CLI: 18.2.12.
I am not using ngExpressEngine, but I am using @angular/platform-server
The application works fine with npm run build:...
0
votes
1
answer
458
views
Which one is @angular-devkit/build-angular:application equivalent in @angular-builders/custom-webpack
We have requirement to hide environment variables which are comes together in build files in angular application.
We found solution using @angular-builders/custom-webpack and dotenv libraries when ...
2
votes
2
answers
864
views
Angular Guard Issue with Server-Side Rendering (SSR)
I'm working on an Angular 17 project with login and session functionality. Everything is working well except for the guard. Every time I refresh the page, the screen briefly blinks back to the login ...
1
vote
1
answer
392
views
Angular flickering issue
I’m using Angular 19 with SSR, and I have a dropdown that momentarily displays the wrong value (e.g., the first option or a default) before updating to the correct one. I need the dropdown to show the ...
1
vote
0
answers
165
views
Angular SSR fails to access .NET backend with SSL while client-side works fine
I'm encountering an SSL certificate issue with Angular SSR (Server-Side Rendering) when trying to access my .NET backend. The interesting part is that everything works perfectly fine on client-side ...
2
votes
1
answer
607
views
Angular signals: Template displays both "if" and "else" content
I have a strange issue within my Angular application.
In my component, I have a signal for loading and a data which is fetched with HTTPClient:
loading = signal(false);
competition = toSignal(
...
-1
votes
1
answer
40
views
HttpErrorResponse occurs only in angular terminal output, but no errors in app
HttpErrorResponse occurs only in angular terminal output complaining about invalid credentials. But the app works without error in browser, and the http request returns 200. There are no errors in ...