691 questions
0
votes
0
answers
57
views
How to link a ticket to its related object using objectId in Angular when data comes from /api/objects?caseId=...?
I’m building an Angular frontend for an ERP-like system, and I’m trying to generate a link like:
<a [routerLink]="['/erp/real-estates/objects', objectId]">Gå till objekt # som ...
1
vote
1
answer
71
views
Including a base64 image as a string const in an Angular project
I have several base64-encoded images for use in an Angular project (currently in Angular 19). Since some are used more than once, I do not want to embed them in a template. Instead, I would like to ...
1
vote
1
answer
105
views
Angular 19: TypeScript Error with Conditional Type Checking in Dynamic Table Component
I have a dynamic table component in Angular 19, which is built using a TableConfig object. This configuration creates the table's structure, including headers, columns, and rows. The rows property of ...
1
vote
1
answer
49
views
In Angular how to segregate the part of reactive form in seperate ng-template (s) inside same component?
I want to use some part of the angular reactive form will come from an ng-template. Seperating in different component will work fine with ngViewProviders. But I want to achieve it via ng-template.
...
1
vote
1
answer
63
views
How to disable/enable reactive form in the template dynamically?
I want to disable (or enable) a FormGroup based on a boolean input of my component
export class MyFormComponent implements OnInit {
form: FormGroup;
@Input() isDisabled: boolean;
ngOnInit(): ...
0
votes
3
answers
83
views
'this' - Element implicitly has an 'any' type because expression of type 'any' can't be used to index type
I have defined 3 @Viewchild template refs and an array
@ViewChild('one') one!: TemplateRef<any>;
@ViewChild('two') two!: TemplateRef<any>;
@ViewChild('three') three!: TemplateRef<...
1
vote
1
answer
739
views
Error: NG05105: Unexpected synthetic property @if(uploadProgress) found
I am using @if template syntax of Angular 17 in my code
<div @if(uploadProgress)>
<progress [value]="uploadProgress" max="100"></progress>
</div&...
0
votes
1
answer
34
views
data not getting updated in template ref modal after opening in angular
I have a login screen where my component has 2 template refs as a modal. One for loading bar and another is for any kind of error
I'm able to send Logging in.. text in loading bar. But while trying ...
2
votes
1
answer
203
views
If I use Map.get('key1') in angular template, does the change detection mechanism check the map value every cycle?
I know it is not a good practice to call expressions from a template in angular, because angular cannot predict whether the return value of a function has changed, so it needs to execute the function ...
0
votes
0
answers
109
views
Angular template with component properties
I am trying to add a component property as a template variable to a template string. Something like this:
template: `
<div fxFlexFill>
<div
class="wrapper"
...
0
votes
1
answer
317
views
Template/view using for directive is not getting updated with signal
I have this code. In debug I can see that WorkersComponent#workers are updated properly. Unfrotunatelly ui is not updated. What's wrong?
@Component({
selector: 'app-planning-workers',
templateUrl: ...
1
vote
1
answer
622
views
new template syntax: if(first) inside for is not working
I want to use the new @for syntax together with @empty to either show the user a table or some text telling there is no data.
With ngFor I usually checked the length of the data array. If not empty:
...
1
vote
1
answer
222
views
Angular 17: auto-append section to every page (component) in section
I'm building a multi-page site in Angular 17. I have 4 main sections, each with their own unique subnav. At the moment, I'm manually adding the subnav component to each HTML template in the section, ...
1
vote
1
answer
549
views
passing data between ng-template to ng-content (Angular 17)
How to pass lists$ from list.component to ng-template
im provided code you could see the pipeline of function calls and how the ng-template passes to modal.compoent.html.
.................................
1
vote
1
answer
105
views
Dynamically adding style tags to component and re-encapsulating the styles (angular)
I am working on an AngularJS to Angular upgrade and we have a hybrid app at the moment that is being bundled up with webpack instead of just angular cli. This has led to problems where we have not ...