Skip to main content

Questions tagged [angular-components]

A component controls a patch of screen called a view. Component decorator allows you to mark a class as an Angular component and provide additional metadata that determines how the component should be processed, instantiated and used at run time.

angular-components
0 votes
0 answers
23 views

How to Synchronize Dial Code with Country Selection in Angular Form?

I'm currently building my own country-flag-dropdown component using angular. The goal is to mimic any International Telephone Input like intl-tel-input, etc. This is what I've done so far. 1.country-...
Panda18989's user avatar
0 votes
0 answers
32 views

Angular component not disposed after OnDestroy

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
0 votes
0 answers
35 views

Angular sidebar menu: How to implement recursion for dynamic nested menus?

I am attempting to create a sidebar menu in Angular 18 using dynamic nested menus based on the following JSON structure, export interface NavigationItem { id: string; title: string; type: 'item' ...
Dikshit Patel's user avatar
0 votes
0 answers
28 views

Angular/CSS: How to style a component based on a built-in component's styling?

I am developing an Angular table library, and I have several components that can be used in place of the standard td or th elements. Currently, I am applying a style that applies to multiple of these ...
Alexander's user avatar
0 votes
0 answers
32 views

How to Navigate NgbDatepicker to Selected Month on Open in Angular?

I'm working with ng-bootstrap's NgbDatepicker in my Angular project, and I'm facing an issue with navigating the datepicker to the selected month when it's opened. Here's a simplified version of my ...
abolfazl_mehdi's user avatar
-1 votes
1 answer
192 views

Angular 18 component not being recognised/shown

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
97 views

How can I use multiple instance of ngx-mat-select-search without checking for input array length?

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
  • 398
0 votes
0 answers
124 views

Why does Angular 18 breaks "inline" imported modules?

In previous Angular versions (< v18) it was possible to import modules dynamically based on a variable inside of a method, like initTemplates(moduleName: string): Observable<ScoreboardModule> ...
Lars's user avatar
  • 1,052
0 votes
1 answer
50 views

Is it possible to render Angular component dynamically using Selectors?

`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
59 views

ViewChild change detection throws ExpressionChangedAfterItHasBeenCheckedError

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
65 views

Dynamically inject HTML with Angular code, into existing DOM

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,104
0 votes
1 answer
140 views

Angular component not loading in the browser due to Observable subscription

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
42 views

Confusion regarding scope of button inside angular

(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
66 views

Why does the Angular constructor run before ngOnChanges even though it's not a part of the lifecycle hooks?

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
62 views

angular project ( html , css & js codes )

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

15 30 50 per page
1
2 3 4 5
138