18 questions from the last 7 days
4
votes
1
answer
126
views
Object is possibly 'undefined' when using optional chaining with control flow
When using Angular's new(ish) control flow, you will get Object is possibly 'undefined' errors when accessing nested object properties after checking if they are truthy with Angular's control flow, ...
2
votes
2
answers
63
views
How to do a http request for user details everytime the userID signal value changes?
I'm just getting used to performing http requests with signals in Angular 20.
I'd like a http get request to be executed everytime the profileUserID signal value (which I have defined in a user ...
4
votes
1
answer
76
views
Angular Reactive Form - patchValue doesn't work on Multiple Select field
Environment Angular 17.x
Setup:
The select form field has multiple enabled. The options are an array of objects - {_id, fullName, ...}. The option value is bound to _id.
Also added a function for the ...
0
votes
1
answer
72
views
Angular - API call made twice
Can someone explain to me why this code makes an API call twice? I'm using Angular 21 with SSR activated.
ngOnInit(): void {
if (this.appService.platform() === 'browser') {
const { ...
3
votes
1
answer
72
views
How to properly augment TypeScript module types without overriding other exports?
I have an Angular library that exposes a permission directive used to show/hide elements based on user permissions. The library defines a generic Permission type, but I want each application to define ...
1
vote
0
answers
69
views
Implementing a Chrome extension using Angular 21 and TypeScript [duplicate]
I’m trying to implement a chrome extension using Angular21. I need to compile background script, that is written using TypeScript. For this I need to compile background script inside Angular build. I ...
0
votes
0
answers
72
views
How to correctly override / augment a type from an npm library using TypeScript module augmentation? [closed]
I’m trying to override a type that comes from my library that was published on npm.
The library exposes a structural directive that uses a Permission type to ensure correct typing in templates:
<...
2
votes
1
answer
68
views
Angular CanDeactivate + browser back button breaks history after canceling navigation twice
I have an Angular (standalone) application with a CanDeactivate guard that prevents navigation when a form is dirty.
Reproduction steps:
Navigate to User Management
Click on a user (e.g. “Alice”).
...
2
votes
1
answer
61
views
NG0201: No provider found for `InjectionToken @ngrx/store Root Store Provider`
I have a basic setup of NgRX to learn the flow.
Now it gets to use the NgRX Effects, and my implementations throw error, Please review and let me know what may missed?
"dependencies": {
...
0
votes
0
answers
51
views
nginx reverse proxy not re-resolving dns after servers restarting
we are having an issue with nginx reverse proxy, over k8s cluster
We have an angular app served by nginx, acts as reverse proxy and as a web server, all API requests are being executed via the nginx.
...
1
vote
1
answer
46
views
How to implement a strict Content Security Policy with nonce using Apache and Angular (20.3) SSR?
I have spent the entire morning trying to implement a strict Content Security Policy (CSP) using nonces with Apache and Angular 20.3 SSR.
On the Apache side, I am able to generate a nonce correctly ...
-4
votes
0
answers
44
views
How to use Saga blue theme in primeng in angular version >=18 [closed]
I am migrating a large-scale Angular application that uses PrimeNG from Angular 17 to Angular 18.
Up to Angular 17, we were using a compatible PrimeNG version where the resources folder existed inside ...
1
vote
0
answers
79
views
Why does a Micro Frontend component work only when standalone: true in Angular 19?
I am using Angular 19 with a Micro Frontend architecture (Project A = host, Project B = remote).
Everything works perfectly inside Project B itself.
However, when I load Project B from Project A, I ...
3
votes
1
answer
56
views
Angular Signals: effect() error when used in afterNextRender
Complete error : effect() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with runInInjectionContext
I have a simple ...
0
votes
1
answer
45
views
How to make a listing dynamic inside of 2 loops in Angular
<ng-container *ngFor="let grup of secili.grupList; let grupIndex = index">
<div class="pb-2">
<div class="col-12 pt-0 border-1" style="...