306,733 questions
0
votes
0
answers
26
views
Angular 17 - routes extraOptions not working in a standalone + modules type mix application
Environment:
Angular 17
Application starts as standalone. Some parts of the application is having standalone components and some have modules. The issue is in a component which is part of a module.
...
0
votes
0
answers
34
views
Multiple instances of angular component react to changes from other instances
I have a moderately sized angular app with an edit control (edit, save, cancel) used throughout the app that controls permissions, view state/etc. There can be multiple instances of this component in ...
Best practices
1
vote
3
replies
32
views
Angular : data fetched is not appearing in html
I am creating an e-com project. I am fetching data from the backend, the data is being returned, but in my html, the array is appearing empty.
private apiService = inject(sProducts);
url: string = &...
0
votes
0
answers
27
views
Angular 14 ES5 build still fails on LG webOS 3 / webOS 4 (Chromium 68) – runtime error Cannot read property 'get' of undefined
We are using Angular 14 for our frontend application. As per Angular’s build process, the final output is plain HTML, CSS, and JavaScript. Based on this, our understanding is that Angular applications ...
0
votes
1
answer
24
views
Cypress unable to find a Quill editor in Angular table
I am trying to automate a table test on a site written in Angular, I can get Cypress to find the field label but it just won't locate the actual Quill editor inside the multiple-text element. I can ...
0
votes
1
answer
47
views
Building Angular app with 'npm run build' gives Node.js version error, but 'ng build' works
When I try to run npm run build , Angular complains about the Node version installed. The version it's complaining about is not installed at all, and definitely not the one that NVM currently set to.
...
0
votes
1
answer
56
views
How to do a parameterized animation using animate.enter in Angular 21?
I'm currently migrating my projects from @angular/animations to CSS animations because the animations library is deprecated and going to be removed in Angular 23.
Migrating animations to CSS ...
-2
votes
0
answers
34
views
Micro frontend using Angular 18 native federation module with Primeng 18
We have a micro frontend setup consisting of a host application (shell app) and a remote application. PrimeNG v18 and its required dependencies (PrimeIcons, PrimeFlex, Angular CDK) were installed and ...
0
votes
0
answers
67
views
Angular 21 signal forms: How to loop over an array of complex sub-objects? [closed]
Let's take this simple example: I have want to write an app that edits an objects that has a list of e.g. users as one property and a user edit component should be rendered for every user in the list.
...
Best practices
0
votes
2
replies
36
views
One signal vs. multiple derived signals for complex api responses?
I’m working on a project using Angular 17+ Signals and I’m looking for some advice on the best way to expose data from a service to multiple different forms.
I have an API that returns a settings ...
0
votes
0
answers
79
views
CanActivate and SSR In Angular 21
I encountered an issue with my Angular Guard. When I type a path, for example /home, I get automatically redirected to /login.
Here’s the Guard code I’m using:
import { isPlatformBrowser } from '@...
1
vote
1
answer
45
views
How to add conditions to an i18n translation file
I have an angular application available in English and French. It displays the list of pictures of different countries
@for (country of countries; track $index) {
<h2 i18n>Pictures of {{country}}...
1
vote
0
answers
77
views
HTML Canvas Drawing Works on Desktop But Not Mobile
I am attempting to use HTML canvas to collect signatures. The drawing works perfectly on mobile but I cannot seem to get the drawing to work on mobile. To be clear the canvas does appear on mobile, it ...
Best practices
0
votes
3
replies
29
views
Angular + .NET (Azure AD BFF): Handling 401 due to token expiry without losing unsaved form data (auto-save to DB only)
I’m working on an Angular frontend with a .NET BFF backend secured using Azure AD authentication (cookie-based, no tokens stored in local/session storage).
Current setup:
Frontend: Angular
Backend: ....
0
votes
2
answers
102
views
Angular TypeScript Element implicitly has an 'any' type because expression of type '1' can't be used to index
I am using Angular to pull a JSON file from a URL and trying to display the values in my page. My current issue is I am getting an error as follows:
Element implicitly has an 'any' type because ...
Advice
1
vote
1
replies
26
views
Can you add extra item to data retrieved with httpResource?
Let's say I retrieve a list of items with a regular HttpRequest, and inside subscribe, I set the value and later update the signal to add more items:
someSignal = signal<SomeListInterface[]>([])...
0
votes
0
answers
39
views
Angular-Language-Translation caps -small [closed]
I have been facing an issue with language translation. In i18n file there so many words I have and it's translating fine but the issue is when I the word caps to small, the words doesn't translate. ex:...
1
vote
1
answer
66
views
Capture Entra Id AADSTS50105 error in SPA using Angular MSAL
I have an Angular SPA application which uses Angular MSAL, enabling users to log into the application. The security permissions (Read directory data) to access the Entra Id User Log Data have been ...
1
vote
2
answers
111
views
Can I use angular effects for API calls?
I have 3 signals. All of them are needed to fetch wiki items. My current approach is to define an effect in the constructor of the component which checks if all the signals have a value and if so, ...
0
votes
0
answers
66
views
NgRx SignalStore: Orchestrating multi-store dependencies (parallel fetching) without coupling?
I am building a large-scale enterprise Angular application using NgRx SignalStore. I strictly separate my modules (e.g., UserModule, RoleModule), where each module has its own Store and Service. Also ...
3
votes
2
answers
93
views
Property 'example' does not exist on type ' componentName'
Using Angular v17, I am trying to get data from app.component.ts into home.component.ts but I am getting an error "Property 'results' does not exist on type 'HomeComponent'."
My full project ...
Advice
1
vote
2
replies
49
views
Angular Signal Forms: How can custom controls become invalid
I know that Angular gives the following advice for validation in custom controls:
IMPORTANT: Don't implement validation logic in your control. Define validation rules in the form schema and let your ...
4
votes
2
answers
115
views
How to track if view is rendered for new input in Angular
I have an Angular v20 application with signal implementations. On one of the logics, I have a component where I have to set the id of the dom element from the signal directly. When I update the signal ...
-3
votes
0
answers
110
views
How to prevent vertical scrollbar from reducing layout width (avoid 8px shift) when scrollbar appears [closed]
Title: How to prevent vertical scrollbar from shifting fixed-width horizontal layouts on Windows?
I am working on a fixed-width dashboard (1920px) where I have a row of exactly 7 input fields. Due to ...
2
votes
1
answer
52
views
How do I get chip like text from user free input using p-autocomplete? (Alternative to p-chip)
My primeng version got upgraded from 17.18.12 to 19.1.3.
In my 17.18.12 version, I was using p-chips component with following attributes:
<p-chips [allowDuplicate]="false" ...
2
votes
0
answers
88
views
Blazor WebAssembly Custom Elements fail to load resources after upgrading to .NET 10
I am using Blazor WebAssembly custom elements inside an Angular application via
Microsoft.AspNetCore.Components.CustomElements.
I register the Blazor components like this:
builder.RootComponents....
0
votes
0
answers
61
views
Angular html image refresh behaves differently in FireFox compared to other browsers like Edge and Chrome
So I have a video feed on my Angular site, except it's not a real video feed and is instead just a static image that refreshes every second. Note that this is intended as the source of the feed doesn'...
3
votes
2
answers
142
views
setTimeout not triggering change detection in my Angular code
I am trying to create a toast service for my e-commerce project. Initially, this was my code below. There is a toasts array and an add function. We can pass in a message to the add function and it ...
2
votes
1
answer
128
views
Angular Electron: Typescript component is not rendered in index.html
I am new in Angular environment and I am actually developing a little desktop app with electron.
I have inserted the selector (app-root) of the App component (generated automatically) into index.html'...
0
votes
1
answer
116
views
How to wrap ngMenu into a reusable component while letting consumers provide a custom trigger button?
There's an example on using the new Angular Aria menu feature here.
Below is a simplified version of the example code (with only one button):
<button ngMenuTrigger #origin #trigger="...
0
votes
1
answer
104
views
Angular not loading the updated data after an API call [closed]
I am working on a simple Angular app where I fetch data from an API, then load it in the html template.
import { Component, inject, OnInit } from '@angular/core';
import { ReclamationService } from '.....
-1
votes
1
answer
78
views
Angular version 18.2.14 has a bug on @Directive standalone compiling
Looks like Angular version 18.2.14 has a bug on @Directive standalone compiling
the directive:
import { Directive, ElementRef, HostListener } from '@angular/core';
@Directive({
selector: '[...
0
votes
0
answers
50
views
Can I use node version X for building Angular Frontend and node version Y for building backend and serving the web app?
We have a Angular Web app which has a node js backend. We are using currently node version Y.
For CICD we are using a Jenkins server. Jenkins server and web server are both using node version Y. ...
0
votes
1
answer
69
views
Padding button looks even on browser inspector, but not on phone
Every time I write a primeng button for some reason in the browser inspector (even when it´s on phone view) the padding (or text) of the button looks centered:
However in my phone Google Chrome does ...
0
votes
1
answer
56
views
How to debug and identify if the component or a specific part of the component was rerendered?
In Angular, assuming I have this component where automationId is updated every new content while txt is updated less frequent. During those times that txt is NOT updated or the value remains as the ...
0
votes
0
answers
42
views
Primeng input control expands pass its container
It seems that Primeng input control has a fixed size (width) under the hood. I tried to limit the width in order to fit in a grid layout but failed: the control is wider than its container. For a ...
1
vote
1
answer
66
views
How to fit Accordion Panels to the screen?
I am using the PrimeNG Accordion component where the first panel contains a form and the second and third panel contain tables. See an example here:
https://stackblitz.com/edit/wawhkkem-rwy91iox
<...
0
votes
0
answers
76
views
Angular CdkTree expand all parent nodes
i have a use case where I have a MatTree<Item> where Item contains a key
property. Given a specific key , i would like to expand the MatTreeNode and its parent recursively till root. Currently, ...
1
vote
0
answers
50
views
ng-bootstrap Datepicker throws NG0203 takeUntilDestroyed() error on Angular 20
Problem
When clicking on an ngbDatepicker input to open the datepicker popup, I get the following runtime error:
ERROR RuntimeError: NG0203: takeUntilDestroyed() can only be used within an injection ...
1
vote
0
answers
90
views
How to send HttpOnly cookies (refresh token) to ASP.NET Core backend on localhost?
I’m setting an HttpOnly cookie in the browser every time a user logs in or signs up on my website. This cookie contains a refresh token that I use to get a new access token.
The problem is that the ...
Best practices
1
vote
1
replies
36
views
Angular afterNextRender which phase to use with ResizeObserver
I am using a ResizeObserver to monitor an element's dimensions. When the size changes, I update a Signal (or state variable) that is bound to a CSS Variable in my template. This CSS variable then ...
1
vote
1
answer
123
views
How to install the latest Tailwind (v4) in an Ionic/Angular project
We'd like to install the latest Tailwind (v4) into our Ionic/Angular project so we can use its utility-first approach.
I've tried the guides mentioned here:
Angular guide
Capawesome guide
Workaround ...
2
votes
2
answers
290
views
ng build crashes with heap corruption (exit code -1073740940) on Node.js 24 during Angular library compilation
After migrating to Angular CLI 20.3.6 and Node.js 24.0.0 When building an Angular library using ng build --configuration production library, the build process crashes sporadically with exit code -...
2
votes
1
answer
49
views
ngOnDestroy is not working inside ComponentPortal
I am creating a ComponentPortal for use in an overlay like so.
const myPortal = new ComponentPortal(MyComponent, null, Injector.create({
name: 'MyPortalInjector',
parent: this.injector, // ...
0
votes
1
answer
45
views
How to set if ag grid row is selectable
I have ag grid rows, a row can have 0 or many children. I would like to define selectable rows which are at level 0 (rows which don't have parent).
here is my column definitions :
{
columnDefs: [
...
Advice
2
votes
3
replies
89
views
@for adds whitespace nodes when preserveWhitespaces: true — is it equivalent to ng-container?
I’m testing Angular’s new control flow syntax @for with preserveWhitespaces: true, and I’m seeing different whitespace behavior compared to *ngFor.
Environment
Angular: 17+ (control flow syntax ...
-1
votes
1
answer
37
views
Angular Service Worker fetch fails after new release with CSP update (Geoapify / OpenStreetMap example)
After our latest Angular app release, which included a CSP update, some functionality broke, specifically related to map tiles.
Scenario:
The app was originally using Google Maps, which worked fine.
...
0
votes
0
answers
74
views
How to add Angular Interceptors after defining the initial interceptors?
I am maintaining ng-openapi, an open source library that generates API clients. I previously added a neat feature to enable client-specific HTTP interceptors.
The library currently uses the legacy ...
Best practices
1
vote
0
replies
58
views
NgRx Signal Store Architecture
I have some questions about ngrx signal store.
How can you let two different stores talk to each other?
Is there something similar to working with slices like in the ngrx store?
Are the new events ...
Best practices
1
vote
1
replies
66
views
Pass data to child components that are multiple levels deep
So I've got a page in my app that goes like this
<app-parent>
<app-child1>
<app-child2>
<app-child2-child1>
et cetera
And the parent contains many variables ...