Questions tagged [angular-changedetection]

Used for questions regarding Angular's change detection routines.

As opposed to AngularJS's digest cycles, Angular uses change detection which occurs in zones (see NgZone). Questions regarding this process, how it differs from AngularJS's digest cycle, how microtasks work, etc., are all applicable to this tag.

353 questions
-1
votes
2 answers

How to update one component from another

I am new in Angular and I am learning it now. I have a problem with updating property in one component from another. I have container component - app.component, and two oders - create.component and list.component. I want to create simple string…
pablo
  • 11
  • 2
-1
votes
1 answer

In Ionic 4, an observable from a store selector doesn’t refresh the UI ! Why?

A simple page with data and async pipe is not reloaded when observable emits new value. I created a blank page with Ionic CLI. I add the Network plugin. In the home page I listen network changes, the console logs the changes but UI is not refreshed…
-1
votes
1 answer

How to use ChangeDetection in Angular 7 (view doesn't updated)?

I don't know how to use Change-Detection in my angular app. The target of my approach is, to show the update-list only if data is changed in my table list. Currently just the first data is shown when I change one row in my table list. In the console…
yuro
  • 2,189
  • 6
  • 40
  • 76
-2
votes
1 answer

detectChanges leads to angular performance issue

I am working on the Spartacus project and I am using detectchanges() method to update the view in angular 10. The code reviewer commented that it causes leads to severe performance issue instead of that they suggesting to use observable. What is the…
-2
votes
4 answers

Reactive formcontrol triggers Change Detection

Reactive FormControl element triggers ChangeDetection whenever the input value is changed. I have added OnPush strategy but still it runs ChangeDetection, @Component({ selector: 'app-server-input', templateUrl: './server-input.component.html', …
anonymous
  • 1,499
  • 2
  • 18
  • 39
-2
votes
2 answers

How to trigger forcefully change detection without changing any input value or reference in angular?

In My code there is one scenario where neither i want to change input value nor want to change reference of input of child component, but still want to trigger change detection forcefully from parent to child component. Is there any way to do it?
Anshita Singh
  • 1,583
  • 1
  • 17
  • 40
-2
votes
1 answer

Calculate `total ` and update `total=quantity*price` in Typescript

I want to calculate something like this: total= quantity*price and update the total when quantity or price changes. template-output-snapshot app.component.html
-11
votes
1 answer

const a: any = someValue !;

I studied the source code of the mechanism changeDetaction in angular6 and came across an interesting design that neither I nor the guys from work know, The code here, does anyone know what it is or how it works? Specifically, line 60: let changes:…
1 2 3
23
24