Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
116 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, ...
Lako12's user avatar
  • 411
2 votes
1 answer
106 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 ...
Gregory Boutte's user avatar
4 votes
1 answer
98 views

I came across this implementation of the outsideCLick directive ngOnInit() { this._ngZone.runOutsideAngular(() => { fromEvent<MouseEvent>(document, DomEventsEnum.MOUSEDOWN, { ...
Dima Savenkov's user avatar
2 votes
1 answer
166 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 ...
Nautilus's user avatar
1 vote
1 answer
166 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: ...
Konrad Viltersten's user avatar
-1 votes
1 answer
96 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 ...
Rawnak Yazdani's user avatar
2 votes
1 answer
98 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
59 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 ...
Alex Smykov's user avatar
0 votes
3 answers
89 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,...
user30188574's user avatar
1 vote
1 answer
412 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 ...
Matan Shushan's user avatar
1 vote
1 answer
129 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 ...
avishekdr's user avatar
  • 1,164
1 vote
0 answers
172 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 ...
Nibo's user avatar
  • 138
0 votes
0 answers
177 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 ...
Agustus Codes's user avatar
1 vote
1 answer
70 views

I have a directive which looks like the following: import { Directive, ElementRef, Input, Renderer2, OnInit } from '@angular/core'; @Directive({ selector: '[appChangeStyle]' }) export class ...
Sonic's user avatar
  • 55
1 vote
1 answer
45 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 ...
marc's user avatar
  • 126

15 30 50 per page
1
2 3 4 5
159