306,535 questions
Advice
0
votes
2
replies
67
views
How to understand this line of HTML?
Why are there square brackets around [ngClass] and [attr.data-testid]?
What does the value of [ngClass] indicate? For example, what is the || operator doing in there, and the empty string ''?
Where ...
Best practices
2
votes
1
replies
60
views
Better using enum or type or maybe constant object in Angular / TypeScript?
Whats better in angular project right now?
Because i really confused right now
export enum UserRole {
ADMIN = 'ADMIN',
USER = 'USER',
GUEST = 'GUEST',
}
export type UserRole = 'ADMIN' | 'USER' |...
-4
votes
0
answers
57
views
Mend Bolt reporting Chart-1.0.2.min.js vulnerability but file doesn't exist in project [closed]
Mend Bolt in my Azure DevOps pipeline keeps reporting a vulnerability for Chart-1.0.2.min.js (CVE-2020-7746) but the file doesn't exist anywhere in my project.
What I've checked:
Searched entire ...
-5
votes
0
answers
104
views
Why are Angular Material modules imported multiple times in my AppModule and is this configuration correct? [closed]
Question
I have an Angular application where I’m setting up Angular Material modules, HTTP client, forms, and toastr notifications inside my AppModule. The app runs, but I’m unsure if my module setup ...
1
vote
1
answer
129
views
How do I prevent Angular material select to open upon pressing the enter key?
I have a form within a mat-dialog and I'd like the dialog to "submit" upon pressing the enter key given it is valid, i.e. close and pass the form's value to the dialog's afterClose promise.
...
Best practices
1
vote
5
replies
107
views
Semantic versioning for internal npm package
We have:
Main project X (Angular app)
Helper package P (pure JavaScript internal package)
Package P is hosted on our private npm registry and consumed by project X through package.json.
Our releases ...
0
votes
0
answers
149
views
Angular website crashes after navigation in Safari [closed]
We have an Angular 18 application running with SSR that works correctly on most devices, but some iPhone users experience a full browser/WebView crash after the page loads and a navigation occurs.
The ...
-1
votes
1
answer
138
views
Why I can't see the the data after I move to transactions subpage?
Let's say I have 2 pages: first, that creates data (transaction) and second that displays the transactions in table. I also have navigation to those subpages ('/create-transaction' and '/transactions')...
2
votes
4
answers
170
views
Signal doesn't update when creating a new array of objects
Why doesn't my .set(...) method update the signal when the array is constructed with the spread operator?
What I have is product editor, that features an input of type file, with a preview generator.
...
2
votes
1
answer
78
views
Issue in Angular Material version 21 - animation not working
I used Angular version 21 with Material version 21:
<mat-form-field appearance="outline">
<mat-label>Outline form field</mat-label>
<input matInput placeholder="...
Best practices
1
vote
3
replies
74
views
Any Best Practice Setup Form in Angular 18-20?
I’m currently working on an Angular project and trying to figure out the best way to set up forms in Angular 18–20.
Right now I’m using Reactive Forms, but I’ve seen some discussions about the ...
1
vote
1
answer
78
views
Navbar in Angular not loading pages
I've got a nav bar in my Angular app. But when I click on the different navigational elements it does not reload the page to the other content on the navbar.
I think it is the routerLink= part.
I am ...
1
vote
1
answer
102
views
How can I re-render a parent div element when its @if child content changes?
I have a tooltip element floating above the cursor. The size of the tooltip is obviously dependent on its content. I also need the tooltip to be completely visible inside the viewport, thus I set the ...
1
vote
1
answer
139
views
How to have dynamic schemas for signal forms?
In order to simplify form management in my apps, I have created a form component:
export type MyFormModel = Record<string, number|string>;
export type MyFormFields = MyFormField[];
export type ...
Best practices
0
votes
2
replies
62
views
Best method for loading a new page based on the value of an API response: Call API before or after landing
for some background we are in Angular 20 & using a java-based server for the API.
The client has a use case where they will view a table of URLs matched with data about (an) entity. When they ...
