Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
148 views

I thought @input was supposed to set off the change detector when it is used? When I use the mask input to "disable" this component from a parent component, it just keeps spinning with mat-...
coloradoman's user avatar
1 vote
1 answer
268 views

My reload component: import {ChangeDetectionStrategy, Component, input, output, resource} from '@angular/core'; import {ErrorService} from "../error.service"; @Component({ selector: 'a50-...
Galdor's user avatar
  • 2,013
1 vote
2 answers
54 views

I have a component that displays dynamic, read-only data. For example: <div>{{getText()}}</div> I noticed that getText is being invoked over and over by Angular, even if there is ...
Ya.'s user avatar
  • 2,717
1 vote
1 answer
80 views

My question is about angular change detection and zonejs: is zonejs used by the (click) event below? @Component({ template: ` <button (click)="changeName()">Change name</...
balteo's user avatar
  • 24.9k
2 votes
1 answer
214 views

I know it is not a good practice to call expressions from a template in angular, because angular cannot predict whether the return value of a function has changed, so it needs to execute the function ...
José Bate's user avatar
1 vote
0 answers
41 views

I'm creating a component that has a rather complex, nested configuration export type LayerGroup = { name: string; layers: Array<VectorLayerDefinition | TileLayerDefinition | LayerGroup>; ...
Frank Dekervel's user avatar
1 vote
0 answers
155 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
2 votes
2 answers
654 views

I'm a bit confused over the behaviour of this loop in Angular: A simple *ngFor loop over an array of 5 fields <div *ngFor="let field of this.fields" > <div class="block"&...
DeclanMcD's user avatar
  • 1,586
1 vote
2 answers
130 views

I was required to update a project's UI without breaking any logic(I broke). In the old UI authentication(login page) and the rest(other resources that you get access to after authentication) were in ...
NoName's user avatar
  • 245
1 vote
1 answer
180 views

I trying to test a simple component: HTML: <ng-container *ngIf="lessThanTen(value) else moreThanTen"> <div class="circle" [ngClass]="{'active': isActive}&...
greatorangejuice's user avatar
1 vote
2 answers
77 views

I want to trigger changes in landing.component.ts once I make changes in cites.component.ts mediator.service.ts @Injectable() export class MediatorService { private updateValue$: BehaviorSubject<...
Tushar Agarwal's user avatar
1 vote
1 answer
269 views

What would be the best practice for avoiding event emitters inside ngOnChanges? Here is a small example: export class HeroListComponent implements OnChanges { @Input() heroNames: string[] = []; ...
matthjes's user avatar
  • 749
0 votes
1 answer
168 views

I have made a small ->stackblitz <- to demonstrate my issue. I have a master component that has pan-zoom within which there's a parent component that holds some content (the children). The ...
Mike Dolha's user avatar
1 vote
0 answers
336 views

This was working fine for some time until I found out it wasn't. The issue I face is the following. I have an abstract value accessor class which is being extended by multiple custom form controls. It ...
pop's user avatar
  • 3,782
0 votes
1 answer
809 views

I have trouble passing the nested FormGroup (the one that is a FormControl of an outer FormGroup) as an input to a child component. More precisely, the changes made to the form group are reflected in ...
antekdev's user avatar
0 votes
1 answer
46 views

My ultimate goal is to prevent triggering CD in ancestor/parent comps when a DOM click event is registered in a child comp. From what I understand, this is not possible, ancestors/parents of the child ...
pete19's user avatar
  • 123
0 votes
2 answers
178 views

I have the following two components in a parent / child relationship: "Properties" - the parent in this scenario and "listingsList" - the child. Here's the parent template: <...
Amokachi's user avatar
  • 109
0 votes
1 answer
59 views

I want to update each item height in *ngFor elements' based on the tallest item. The idea was to get each height from ViewChild, then emit output to container, and then push it (or via observable ...
Paweł Stolka's user avatar
0 votes
1 answer
165 views

We had a an old babel-polyfill in our project. Now, when we remove it, Angular DevTools shows an infinite Change Detetction Loop with Source "Window.addEventListener:message". Anyone has an ...
Basti291's user avatar
1 vote
1 answer
50 views

I am just playing with Angular change detection cycle and I found something that I can't understand. We have following component's view: <!-- ver:1 call() was called 3 times --> <div> &...
Boyan Stoyanov's user avatar
0 votes
1 answer
1k views

I've noticed a strange behavior of change detection in Angular. When Observable updated as in the example, change detection not triggered for some reason. The key here is setTimeout called inside the ...
BOBROVICE's user avatar
0 votes
1 answer
284 views

Component.ts @Component({ selector: 'app-sample', templateUrl: './sample.component.html', styleUrls: ['./sample.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, }) export ...
Narek Keshishyan's user avatar
0 votes
1 answer
441 views

There is 3 components: Parent, Child, ChildChild: @Component({ template: `<div>{{parentProp}}</div> <child-component></child-component>`, changeDetection: ...
Dmitry Dagadin's user avatar
-1 votes
2 answers
47 views

i have two pages APP COMPONENT HTML <a routerLink="hello-page">HELLO PAGE</a> <div></div> <a routerLink="counter">COUNTER</a> <router-outlet&...
someusername12's user avatar
1 vote
1 answer
696 views

I have a very simple Angular attribute directive that looks something like this: import { Directive, Input, OnInit } from "@angular/core"; @Directive({ selector: "[foo]", }) ...
Mikkel R. Lund's user avatar

1
2 3 4 5
10