Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
44 views

My LoginComponent: import { Component } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-login', standalone: false, templateUrl: './login....
Naveen kumar's user avatar
1 vote
1 answer
53 views

I think I have a knot in my brain, it can't be that difficult. I have an Angular component and it is called in my app.html <app-custom></app-custom> and if app-custom does not exist, a ...
pepenipf's user avatar
1 vote
1 answer
113 views

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 ...
Razzer's user avatar
  • 891
1 vote
1 answer
208 views

I've run into a problem that my header's imports are not loaded properly in SSR. In my Angular 19 application the app.component.html includes a static <app-header> component that should exist on ...
Ivan Kusliy's user avatar
2 votes
1 answer
70 views

I am trying to wrap Angular/Youtube component, described here. This stackblitz is the result. The problem here is that <youtube-player #musicPlayer [videoId]="extractVideoId(videoId)" ...
Foxhunt's user avatar
  • 984
2 votes
1 answer
42 views

I have a parent component whose template is basically this: <table> <thead> <tr> <th>Data 1</th> <th>Data 2</th> </tr> </...
Raj's user avatar
  • 25
0 votes
2 answers
60 views

Let's say I have a module with components and services which should only be loaded if a specific feature flag is true. The app.component checks for the feature flag and in its template has a component ...
pop's user avatar
  • 3,809
2 votes
2 answers
691 views

I have an Angular dropdown component (CustomDropdownComponent) that receives a list of options and a selected value from its parent component via @Input(). The parent also listens for selection ...
David Küng's user avatar
1 vote
2 answers
152 views

I am receiving an HTML string from an API response and need to render it inside my Angular component while keeping the component's CSS styles applied. What I have tried: Using [innerHTML], but the ...
Lebanta's user avatar
  • 53
1 vote
2 answers
81 views

Disclaimer: I may be wrong about my understanding of this seeing as I have only been using Angular for little over a year (Angular 16.0.0). Code I have this component (SidebarComponent): @Component({ ...
Wael Dghim's user avatar
0 votes
3 answers
632 views

I'm trying to filter an array based on the value of a signal , I think computed signal is the best option for this purpose. My goal is to show only the results that match (via a custom filtering ...
berno's user avatar
  • 253
0 votes
1 answer
110 views

I want to update my heart icon, which bound to every product, to add to favourites. <i class="fa-regular fa-heart" *ngIf="!isFavourite"></i> <i class="fa-...
lordlaurent's user avatar
1 vote
1 answer
74 views

I am questioning myself of whether or not to structure my Angular components in sub divs, to make the html better. I do have a main page and a overview component. Is it good practices in Angular to ...
thegreyluk's user avatar
1 vote
1 answer
72 views

Inside global-component I have method for dynamically creating component const comFactory = this.resolver.resolveComponentFactory(ParentComponent); const component: any = this.componentContainer....
Sara's user avatar
  • 751
1 vote
1 answer
275 views

I have an angular 18 project which pulls the image data from an API to dispaly's it on screen. Can someone help me understand this behaviour? The app throws an exception 'document is not defined' with ...
Bijaya Rai's user avatar
2 votes
4 answers
349 views

I'm learning Angular 18 while I already know React. I have a "pretty big" HTML file, which I would like to split. Let's take this pseudo and minified example: <ul> <li>Hello<...
ncasteln's user avatar
  • 342
0 votes
1 answer
92 views

I'm trying to format some fields into neat rows and columns, and because I have to match some other components with very specific formatting, the html that works looks like this: <div fxLayout=&...
devjoco's user avatar
  • 504
0 votes
0 answers
52 views

I am working on creating a Search by field that when clicked on will have a check box to search by address. It is a button with mat-menu component. I want to add it inside of the app-table-actions ...
developer8492's user avatar
0 votes
1 answer
77 views

New to Angular (using 18.2) and trying to get callbacks from mouse events on an svg working. The code is like this: component.html … <object data="image.svg" type="image/svg+xml&...
Aaron Luman's user avatar
1 vote
1 answer
254 views

I am trying to setup my auth.component.ts file to use ViewContainerRef from the placeholder.directive.ts file, but I am unsure what I need to populate inside the createComponent() at the end of the ...
Miles Winokur's user avatar
1 vote
1 answer
157 views

I'm using an internal library that provides a generic solution for authentication, including a login page with a login form. For a specific application, I need to customize the login form by adding ...
JanMod's user avatar
  • 446
0 votes
0 answers
88 views

I have a component with a signal state: array: WritableSignal<string[]> = signal([]); I want the array to be removed from browser memory because the array can get quite big, and the component ...
Jordan Ivanov's user avatar
-1 votes
1 answer
2k views

I started making an Angular 18 app and I added my first component (using standalone components) and the app seems to not recognise my component because when I add it in my app.component.ts as a HTML ...
Tigi Casper's user avatar
2 votes
2 answers
304 views

I made a reusable ngx-mat-select-search component which looks like this mat-tooltip-select-all.component.ts export class MatTooltipSelectAllComponent implements OnInit, AfterViewInit, OnDestroy { @...
lance2k's user avatar
  • 399
-1 votes
1 answer
161 views

`Is it possible to render an Angular component dynamically? For example, I have component selector names in my .ts file. When I bind the variable in the .html file using interpolation and innerHTML, ...
user23281502's user avatar
1 vote
0 answers
161 views

I have custom Angular Component modal-component that serves as a proxy for MatModalDialog with ngTemplateOutlet as body for mat-dialog-content. <mat-dialog-content class="modal-dialog-medium&...
Johnys's user avatar
  • 135
1 vote
2 answers
1k views

I am using Bootstrap Tables in an Angular app. To render custom buttons in a cell, I have to write the HTML code from the Angular Component, defining the HTML as a string. However in this way, I can't ...
DeLac's user avatar
  • 1,132
0 votes
1 answer
780 views

In this component when I call the getCurrentSalahOrIqamah function in the ngOninit so my component is not loaded in the browser. and keep stuck. I tried with both lazyloaded eager loaded component but ...
Muhammad Shahab's user avatar
1 vote
1 answer
59 views

(click) event in one instance of a component is triggering function in another instance. I don't know how to explain this. I've attached a stackblitz example. Clicking on both the buttons print same ...
Nithish Kumar's user avatar
-1 votes
1 answer
253 views

I've noticed that in Angular, the constructor of a component runs before the ngOnChanges hook, despite the constructor not being considered a part of the lifecycle hooks. Could someone explain why ...
ankush kumar's user avatar
-2 votes
1 answer
111 views

In my angular project , i have 4 components (comp1,comp2,comp3,comp4), i found a code of form (html , css & js ) and i wanna put it in comp1, so tell me if i'm right or not : do i put the html ...
Mohamed Seif Ben Salah's user avatar
0 votes
2 answers
2k views

fellow developers! I am using VS Code (latest version) for my Angular (17) app. I can right-click a folder and select the "New component" option to automatically create a new Angular ...
TheCuBeMan's user avatar
  • 2,583
0 votes
1 answer
123 views

Generally while passing data from child to parent or parent to child we use @input and @output what are the benefits @input and @output have over subject or services apart from it's the most organic ...
Chinmay Yogi's user avatar
0 votes
2 answers
143 views

Assume i have a component that takes three inputs input1, input2 and input3 export class testComponent { @Input() input1:string; @Input() input2:string; @Input() input3:string; .... ... } ...
Nithish Kumar's user avatar
0 votes
1 answer
3k views

I have developed a project using the Angular 17 tool. This was creating the two sets of folders for the server and browser during the creation(build) of the dist folder. That was not the case with the ...
Usha Deva's user avatar
0 votes
0 answers
107 views

I have to dynamically (at runtime) create a component with template built of string. This string contains some tags that need to be replaced by Angular components. For example HTML template: <div ...
iwan's user avatar
  • 1
0 votes
1 answer
50 views

You define the FormGroup in the Dumb component to keep related data together. Then you need async validators on some form controls, but dumb component should not have service calls. One option is to ...
Mihai Socaciu's user avatar
0 votes
0 answers
469 views

I'm trying to use Angular Signal Based Components feature. Just seen this on Angular Signal Based Components. How do I use signals: true property in component decorator? with v17 release and see the ...
Luca Angrisani's user avatar
1 vote
1 answer
90 views

I have a demo app I am using to test a custom library I have created. I am importing my library and using the custom component in the demo app and that is running just fine, but I can't get the child ...
bschmitty's user avatar
  • 1,218
0 votes
0 answers
330 views

When using *ngComponentOutlet to render dynamic components in Angular, everything works fine until you do not switch component type. If the component type you pass to the *ngComponentOutlet directive ...
Senna Sanzo's user avatar
2 votes
2 answers
3k views

So I have the following situation I have created an angular library ng generate library my-lib I have added a simple component using Ng generate component .lib/test which creates a standalone ...
JKennedy's user avatar
  • 18.9k
1 vote
2 answers
364 views

I have an Angular component that I depend on. This component has a getData method, then this method is called in the template of this component, and the result is displayed using Angular interpolation....
Andrii Hnatushchenko's user avatar
-1 votes
1 answer
178 views

I was just writing code without making any global changes, and suddenly my tailwind broke. Namely, its class "p" and derivatives. Padding just stopped working for me. But not in all elements,...
Ильдар Мустафин's user avatar
3 votes
3 answers
4k views

I'm new to Angular 17 and I've noticed that every time I want to use an ngClass attribute or an ngStyle I get an error like it doesn't recognize them and I get this error NG8002: Can't bind to '...
Dan Lsk's user avatar
  • 31
3 votes
2 answers
3k views

How to set styleUrls instead of styleUrl in component by command ng generate component? In Angular 14, styleUrls property in the component decorator was set automatically after component generating. ...
Anna Zhukova's user avatar
1 vote
0 answers
402 views

We migrated our angular application from angular v13 to v16. The component's lifecycle events were working fine in v13, but having an issue in v16 when routing from one component to another. In our ...
kapil's user avatar
  • 19
1 vote
1 answer
55 views

I started creating my own select component with the following input: @Input() options: SelectOption<UserRole>[] = []; The parent (user editor) using this select component gives following ...
Nati's user avatar
  • 181
2 votes
0 answers
354 views

I'm trying to create an Angular component that is a Mat Dialog when the screen is bigger than 500px and Mat Bottom Sheet when the screen is lower. The following code is just a basic example of the ...
Daniel Morales's user avatar
1 vote
1 answer
68 views

I have this class, meant to work as a singleton, export class SingletonClass { public static instance: SingletonClass | undefined; public name: string | undefined | null; static ...
Nalaka526's user avatar
  • 11.5k
1 vote
1 answer
533 views

I'm working on an Angular application where I'm using NzMessageService from Ng-Zorro Ant Design to display messages. I'm trying to pass a dynamic TemplateRef to the NzMessageService but facing some ...
abolfazl_mehdi's user avatar

1
2 3 4 5
42