477 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
225
views
How to use inject() in a child class that calls super()?
I'm trying to migrate an Angular component to use the new inject() function instead of constructor injection. However, my component extends a base class that requires constructor parameters.
import { ...
0
votes
0
answers
33
views
Accessibility Issues Loading mfe-base Page in Shell Application
I'm experiencing accessibility issues when loading a page from my mfe-base. When loading my shell application, the displayed page is from mfe-base. The focus is being assigned to an image, which ...
1
vote
1
answer
177
views
How to properly set up basehref when working with Angular Native Federation?
We are migrating a couple of Angular 17 applications to a Micro-Frontend architecture by using Native Federation, but there is still one issue I still couldn't solve, which is the app context for some ...
3
votes
1
answer
314
views
Angular 17 Module to Standalone Conversion. How should I setup main.ts or app.config.ts?
I'm trying to change my Angular 17 project to be a standalone project. But some of the fundamental files are different than how they are defined in tutorials and other people's projects. I didn't have ...
1
vote
1
answer
58
views
Angular 17 shows Object is possibly 'null'
I am very new to Angular. I am trying to call a GET web API method upon a button click. Now I want to display the response in HTML. When I try to access the model object, it says:
Object is possibly '...
1
vote
0
answers
50
views
Need to update the mock data in angular test
dataTeamService = jasmine.createSpyObj('DataTeamService',['setDataGroup'],{
selectValGroup: of({
id : 1,
accessData : false
})
});
it('shoud remove valData when accessData is false',()=>{
fixture....
1
vote
1
answer
117
views
In Angular .css files url(/assets/mypic.png) files no longer working in build after v17=>v19
I updated Angular v17=>v18=>v19 recently. File references in my.component.css à la background-image:url(/assets/mypic.png) are no longer working.
component.html
<img src="assets/picture....
1
vote
2
answers
79
views
Angular 17 Array push Inserting null object to Array List
I am having a service that insert data in an array ( list ). service.ts code is below.
Problem: Data gets passed to service from component but after push to array it becomes null
import { Injectable } ...
0
votes
1
answer
212
views
How to prevent style leakage between Microfrontend apps when using ViewEncapsulation.None in Angular with Module Federation?
We have migrated our Angular applications into Microfrontends using Dynamic Module Federation (with @angular-architects/module-federation).
In each remote application, I imported a styles.css into app....
0
votes
1
answer
90
views
NG Bootstrap modal disable a button in the modal's template
I'm using Angular 17 and ng-bootstrap 16 and I'm creating an ng-bootstrap modal. I have a Template in my component used as the content for the modal. What I want is to enable or disable the Save ...
1
vote
1
answer
76
views
How to add item below the current item through button click of Angular Formarray
Like it says, I want to add an item to the middle of a FormArray. So, I have a FormArray and every FormArray item has a button to add a new FormArray item. However, it currently always adds it to ...
0
votes
3
answers
85
views
New @for Directive in Angular – Dynamic Array Issue
I'm creating a dynamic FormArray within a FormGroup. The only change I've made is switching from *ngFor to the new @for. The issue occurs when I try to remove an element from the FormArray.
Previously,...
0
votes
0
answers
35
views
Angular 17 upgrade - handle ngclass.*breakpoint changes
I am upgrading my medium-sized application from Angular 16 to Angular 17. However, [ngClass.*] breakpoints are no longer supported in ngx-layout for Angular 17. Since my styles are SCSS-based, I need ...
0
votes
3
answers
117
views
Not able to do component inheritance
I am trying to do component inheritance in Angular 17 and cannot figure why its giving me an error. Here is my code structure:
export class ParentComponent {
constructor(public httpService: ...
0
votes
0
answers
34
views
Syncing the width of mat-header-cell and mat-cell
I am having a mat-table with many columns and the data in some of the mat-cells is empty I want my mat-cell to inherit the width of my mat-header-cell.
Note: width of my mat-header-cell is based on ...