98 questions from the last 30 days
3
votes
1
answer
84
views
WebSocket Secure connection via Angular Frontend WebApp
I've set up a new dev environment with Nginx as reverse proxy using self signed certificates and a Mosquitto MQTT broker.
I have a NestJS backend using MQTT with following configuration:
private ...
Best practices
3
votes
3
replies
71
views
How to avoid messy if statements when using many feature flags in Angular?
I’m part of a team of 10 developers, and recently our product team requires us to use feature flags for almost every new change.
The idea is that they can always “roll back” to the previous behavior ...
3
votes
2
answers
102
views
Upgrading Angular 14 to Angular 15 throws error on build
Build was successful, but after the installation and update of Angular 15, it started throwing multiple error.
For example:
Error: src/app/shared/components/content/reports/sales/partywise-order/...
2
votes
1
answer
68
views
How to Animate using Canvas in Angular
I am trying to code an animated progress wheel in Angular 20. My animation works in a vanilla javascript environment, but when ported to Angular, nothing draws on the canvas and I'm not sure why. I've ...
2
votes
1
answer
104
views
Angular effect calling method which sets other signal
In angular, if I have an effect which calls some method which further on sets some other signal, will that effect be bind to that "other signal" or just signals called directly inside the ...
2
votes
1
answer
69
views
Angular Karma getting Module not found: Error: Can't resolve
I have a large Angular App that works fine. (v20 if it matters)
I recently added a new service to my App.Component, and now I'm getting the following error. ONLY in Karma, the service works as ...
2
votes
1
answer
52
views
Azure SWA - Angular 19 Environments file replacements not working
When I deploy my Angular app to Azure SWA, it seems to keep using the default environment.ts file (which is for dev) I have a console.log(environment.api) on my landing page, so I can confirm the env ...
2
votes
2
answers
87
views
Unable to show/get date values from formarray.controls
I am developing a timesheet form page in Angular 20.
I am using formGroup, FormArray and FormControl classes.
I am facing issues in retrieving and displaying the date values which I am pushing into ...
2
votes
1
answer
107
views
Nx Angular build fails intermittently with nx run frontend:build:development - no error output despite --verbose flag
I'm experiencing intermittent build failures with my Angular application in an Nx monorepo. The build command nx run frontend:build:development sometimes succeeds and sometimes fails, but I cannot get ...
2
votes
1
answer
162
views
Angular Php File Upload Issue
This is the basic file upload I am trying using angular and php.
When I choose the file in UI, I can see the file details.
But, when I execute it I am getting empty array as response in network tab.
...
1
vote
2
answers
65
views
Angular import global style file fails
I have an angular v20 project.
I have implemented a class "redborder" in "src/styles.scss" file and I am trying to @use the "redborder" class from a component style file ...
Best practices
1
vote
3
replies
73
views
How can I optimize my nodejs backend code for live data emiting for dashboard in UI
So I am working on a MEAN stack project where in node I will emit the data to UI and in frontend I had some widgets ( as charts like gauge , line , pie and table ) where user can add dynamically ...
1
vote
2
answers
84
views
Prevent navigation to non-existent ID params
I try to prevent user to navigate to a non-existent id parameters with my details component. I read the documentation of Angular v20 and it seems that the "resolvers routes configuring" is ...
1
vote
1
answer
57
views
HttpTestingController runs endlessly
In my component I have httpResource:
export class EmployeesComponent {
employees = httpResource<EmployeeResponseDtoOutput[]>(() => '/api/employees', {
defaultValue: [],
});
}
and in ...
1
vote
3
answers
62
views
Send Observable result to child component as Signal
In my code I am trying to get the result from this observable:
// Runs fine
obtenerOfertaPorId(id: number): Observable<Oferta> {
return this.http.get<Oferta>(`${this.apiUrl}${this....
1
vote
1
answer
59
views
Angular Material: Programmatically setting MatSort does not update UI sort arrow
I'm working with an Angular Material table (mat-table) that has sorting enabled via matSort. Sorting works perfectly when I click on the column headers (mat-sort-header).
Now, I want to trigger the ...
1
vote
1
answer
69
views
How to reset field, based on other fields value change?
I’m using Angular 21’s new Signal Forms. I have a search form where the user types a query, receives a paginated result list, and can move between pages.
When the user changes the search phrase, I ...
1
vote
1
answer
57
views
Issue consuming API that returns Base64 Excel file in Angular
I am facing difficulties consuming an API in Angular that returns an Excel file encoded in Base64. The API is configured in AWS API Gateway and uses a Lambda function to generate the file. Although ...
1
vote
1
answer
60
views
Form with nested arrays and groupform
Any idea what I am doing wrong?
I need to set it up where I have Events that contain a FormGroup and it has Dates as another Array of FormGroup.
I am getting this error "ERROR TypeError: Cannot ...
Advice
1
vote
3
replies
61
views
Angular 20 @defer dynamic dependencies
I have an Angular component in a private npm package using ng-packagr and hosted on AWS (CodeArtifact).
The purpose of the component is to be a reactive form field that shows and hides errors based on ...
Advice
1
vote
1
replies
200
views
Angular: Vitest vs Jasmine/Karma
I am a bit confused with the Angular testing landscape. I have seen that Vitest will become the new default, replacing Karma. The question I then have is what about Jasmine. Does Vitest replace only ...
1
vote
1
answer
55
views
Angular unit testing - using debugElement.queryAll to get instances of a button
Running this unit test in Angular 21 always fails with the following error:
× should toggle showSettings when settings button is clicked (440231 ms)
● DrawerComponent › should launch settings ...
1
vote
1
answer
45
views
Assume that a signal isn't empty when used inside an @if?
Let's assume you have the following code:
$mySignal = signal<number | undefined>(1)
@if ($mySignal()) {
<foo [item]="$mySignal()"></foo>
}
I got:
Type 'number | ...
1
vote
1
answer
64
views
Set default value from JSON database in form
I have a form which displays some inputs with their value that I get from my JSON database, and I want to have the possibility the update them if needed.
Here's the HTML:
<!-- Start form to update ...
1
vote
1
answer
62
views
Angular compile error using strict templates with @if optional chaining
I'm currently running into an issue/question about optional chaining in Angular. I'm running Angular 20, with "strictTemplates": true enabled as angularCompilerOptions and "strict":...
1
vote
0
answers
44
views
Angular Aria Autocomplete Feature - Compilation Error
I am working with a .NET + Angular WebApp Project
I added Angular Aria to the Angular project hoping to use their Autocomplete feature for a Select Box.
I copied the code directly from the first ...
1
vote
0
answers
44
views
Filter on worksheet columns re-triggering excel office.js custom functions even when it is not volatile functions
Excel re-triggers custom functions created in office.js api addin, but from documentation it should only re-trigger the formulas which are volatile function and in office.js api to specify custom ...
1
vote
0
answers
40
views
NG 21 + Vitest + Non-standalone component with async pipe
With Angular 21, I can't test (with vitest) a non-standalone component using the Async pipe. I get the following error:
X [ERROR] NG8004: No pipe found with name 'async'.
To fix this, import the "...
1
vote
0
answers
55
views
Angular 20 Error: Property 'trackTitle' does not exist on type 'InputSignal<Track>'
I'm getting the following error in my Angular 20 app when using "input".
"Property 'trackTitle' does not exist on type 'InputSignal<Track>'"
I was wondering does anyone know ...
1
vote
2
answers
85
views
Angular: Numbers only directive
I have this piece of code
<input matInput type="number" [(ngModel)]="value"
(ngModelChange)="onChange(true)" />
But I want to be able to enter only numbers, ...
1
vote
1
answer
25
views
some files (like `routes.json`) are generated into `~/.cache/bazel` by default
I open Angular source code in the VSCode, yarn docs is success, but some files (like routes.json) are generated into ~/.cache/bazel (like ~/.cache/bazel/_bazel_anlexn/64c9487e2f334a74d8f87219256e894b/...
1
vote
1
answer
91
views
Nested Array with FormGroup that contains another Array of FormGroup
Any idea what I am doing wrong ?
I need to set it up where I have Events that contains FormGroup and it has Dates as another Array of FormGroup...
What am I doing wrong ?
<div class="control-...
1
vote
1
answer
81
views
Primeng components failure after Angular 20 update
After updating to Angular 20.3.9, primeng does not apply their styles to the input and button of this html and can not also import the Aura theme:
<form class="cloud" id="login-form&...
1
vote
1
answer
62
views
How to use PUT with ngx-uploadx?
I'm using Angular 20 and ngx-uploadx, but I can't seem to select a method for the API request. How can I select the method for the request, for example PUT?
This is my code:
const uploadOptions: ...
1
vote
1
answer
163
views
How to provide default values for individual fields in Angular 21 Signal Forms (without UI flicker) when implementing a FormValueControl?
We're starting to look at Angular 21's new signal-based forms, but I can't find a clean way to define default values for each form field, especially when building forms for objects where multiple keys ...
1
vote
0
answers
78
views
Angular @for Loop Not Updating When Signal is Truncated
Background:
I am working on an Angular 20.3.10 application where I use signals for managing the state of a collection of toast messages. I have SSR and Zoneless enabled and have a web worker ...
Best practices
1
vote
3
replies
90
views
Angular Signals and methods in templates
It is good practice to use signals in templates and bad practice to use methods.
But signals and methods?
Example (using the get method from Map):
userStatuses: WritableSignal<Map<string, string&...
1
vote
0
answers
45
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": {
"...
1
vote
0
answers
41
views
Angular table fails to update after CRUD success
My app uses a facade service (singleton injectable) with signals for state management and RxJS for API calls.
I'm experiencing an inconsistent UI update problem with a table after a successful create ...
1
vote
3
answers
93
views
White page when I use setTimeout
I created an intro/splash screen component that should display for 5 seconds and then automatically navigate to the login page.
The strange thing is:
If I don’t use setTimeout, Angular correctly ...
1
vote
1
answer
70
views
How can I combine two TanStack Query results into a single object?
I have two separate queries using @tanstack/angular-query:
roles = injectQuery(() => ({
enabled: this.user.data(),
queryKey: ['roles'],
queryFn: () =>
lastValueFrom(getRoles({ roles: ...
0
votes
2
answers
106
views
How can I implement a FormArray of FormGroups?
I have a Reactive Form in an Angular 21 application, and the form requires an array of a certain sub-form. (In my case the sub-form(s) define "filters" on a search.) The documentation on ...
Advice
0
votes
2
replies
79
views
SPA framework output access without node or any server setup?
New SPA frameworks like React, Angular, Vue etc. Requires running node js server. But is there any way to run "output" (code generated after transpilation step) without running any server, ...
0
votes
3
answers
243
views
How to inject values from a .env file into Angular environment.ts files during development and prod builds?
I have an Angular 18 app and need to inject environment variable values from a .env file into my environment.ts file and environment.development.ts. I want the values available during development (ng ...
0
votes
2
answers
92
views
Angular 20 is not detecting the change after data is loaded initially
I am using zoneless configuration and making a small homes app which is there on their website. I guess there are using older version of Angular for that. The problem I am facing is if I don't ...
Best practices
0
votes
3
replies
72
views
`patchState` - updates the delete id without waiting for api response
ngrx/signal-store updates the _removedUserId immediately without waiting for await function completes. at present my _removeUser function not called.
here is my code snippet:
withMethods((store: any) =...
Tooling
0
votes
2
replies
87
views
What tools does Angular team use to design svg?
I am reviewing Angular source code.
What tools does Angular team use to design these svg? I take some for example:
//adev/src/assets/images/overview.svg
//adev/src/assets/images/roadmap.svg
//adev/src/...
Tooling
0
votes
1
replies
55
views
How to convert javascript object of mongodb based query to mongodb query as parse
So I have an MEAN stack application where user types query ( or copy from mongodb compass ) in a editor and I use nodejs in backend to perform that query ,
So I use codemirror editor to text codes , ...
Tooling
0
votes
2
replies
43
views
Scan the Code128 barcode using phone/tablet camera
Working on a project to scan the barcode on stickers using phone or tablet camera
Coding - Angular 11
I tried using Zxing-scanner, it scans well when barcode are big enough, but fails for barcode on ...
Best practices
0
votes
2
replies
46
views
How to make different copies of the same PrimeNG component in a scalable way?
Imagine that I am working with primeng and that I need two buttons with different styles using the primeng button component. Both buttons will be used a lot across the project, so my question is what ...