Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
2 answers
88 views

I have this piece of code <input matInput type="number" [(ngModel)]="value" (ngModelChange)="onChange(true)" /> But I want to be able to enter only numbers, ...
2 votes
1 answer
102 views

I created a directive that allow me to change the routerLink of my links. I encountered an error where the routerLink was not updated in one component, but was correctly updated in an other. I found ...
4 votes
1 answer
86 views

I came across this implementation of the outsideCLick directive ngOnInit() { this._ngZone.runOutsideAngular(() => { fromEvent<MouseEvent>(document, DomEventsEnum.MOUSEDOWN, { ...
2 votes
1 answer
153 views

I am working on an Angular project and I've made my own table <app-table> component by wrapping an existing table component from the team, let's say <inner-table>, inside it. Please keep ...
1 vote
1 answer
110 views

In the docs for Angular host directive, it's stated that I can use my inputs/outputs in the template like this. @Component({ ... template: "ID {{someId}}", hostDirectives: [ { directive: ...
-1 votes
1 answer
83 views

I am facing difficulties reaching the callback of the following IntersectionObserver's callback (which is inside a directive) in angular test code and thus are not being able to fulfill the test ...
2 votes
1 answer
92 views

@Directive({ selector: "ng-template[model]", standalone: false, }) export class ViewSelector { @Input() get model() { return this._model; } set model(value: Object) { ...
Mud's user avatar
  • 29.2k
4 votes
1 answer
58 views

Today I tried to make a custom table component. It must take column keys, default column template and column templates for some special columns to override their view. I use angular v19.2. I have this ...
0 votes
3 answers
85 views

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,...
1 vote
1 answer
286 views

I have a custom directive (myDirective) that composes a third-party directive (ThirdPartyDirective) via the hostDirectives property in Angular. I’m passing several inputs directly, but one of them ...
1 vote
1 answer
116 views

I'm creating a thousand separator directive where 1234 will be shown as 1,234 visually but behind the scene it will be 1234 only. So after everything is working expected. Problem is happening when I'm ...
1 vote
0 answers
144 views

I have a few simple helper directives which I want to use throughout the entire app. With modules this was easy to do, but with standalone I don't know how we can do it. One example of such a simple ...
0 votes
0 answers
140 views

On input type="text", I am using two directives - keydown and paste. My requirement is: I need to validate user input string character by character which will be done in keydown event, I ...
1 vote
1 answer
69 views

I have a directive which looks like the following: import { Directive, ElementRef, Input, Renderer2, OnInit } from '@angular/core'; @Directive({ selector: '[appChangeStyle]' }) export class ...
1 vote
1 answer
44 views

I'm having trouble with a directive that worked in Angular 8 but isn't binding to MatSelect in Angular 16. The directive is created, but @ContentChild never succeeds in binding to MatSelect. Directive ...

15 30 50 per page
1
2 3 4 5
...
159

AltStyle によって変換されたページ (->オリジナル) /