angular2-changedetection Questions

1

Solved

I have a scenario where I have two components sitting alongside each other, ComponentA and ComponentB. They both use a service Service. ComponentB contains a button which will make a property in S...
Berg asked 29/4, 2019 at 13:55

1

Solved

I haven't been able to make a minimal reproduction I can put in a plunkr, but in my app I have an infinite loop where ngDoCheck in the root component is called infinitely, so I'd like to be able to...
Sorilda asked 31/3, 2017 at 20:22

4

Solved

I use Bootstrap for my layout and I need to check if the automatic calculated size of my div with bootstrap for example width = 25% is changed. How to perform change detection on a attribute which ...
Thebault asked 18/4, 2016 at 13:47

4

Solved

I have a data table component ( angular2-data-table ) project where we changed the project from Angular's traditional change detection to OnPush for optimized rendering speeds. Once the new change...
Fidelity asked 27/11, 2016 at 14:21

2

Solved

I'm trying to automatically select the first value from set of options in <mat-autocomplete ...> export class ExampleComponent implements OnInit, AfterViewInit { @ViewChildren('auto') matAu...
Pentha asked 2/1, 2018 at 14:1

2

I did a loading-spinner component in my Angular app. I placed it in the app component next to the router-outlet with *ngIf="isLoading" so i could make it visible from everywhere in the application....
Destroy asked 30/7, 2018 at 8:36

4

Solved

I have two component: ParentComponent > ChildComponent and a service, e.g. TitleService. ParentComponent looks like this: export class ParentComponent implements OnInit, OnDestroy { title: s...
Cuprite asked 20/6, 2017 at 14:23

5

Solved

I have pure pipe TranslatePipe that translates phrases using LocaleService that has locale$: Observable<string> current locale. I also have ChangeDetectionStrategy.OnPush enabled for all my c...
Mooneye asked 26/1, 2017 at 8:20

1

Solved

Been running into this one issue and scouring the internet about fixture.detectChanges() where it does not recognize changes in @Input() when explicitly inserting mock data. There are tons of threa...
Booker asked 10/8, 2017 at 22:54

2

Solved

The question Is Angular designed to constantly re-check everything in order to detect changes? I'm coming from the React world and I was expect something like event triggered -> re-rendering. I...
Gwenngwenneth asked 25/6, 2018 at 11:5

1

Solved

I'm trying to create a PowerShell script to open Internet Explorer, navigate to https://clockify.me/login , fill in the email and password inputs and submit the form or click the log in button. Th...
Coverlet asked 7/6, 2018 at 16:37

2

Solved

I understood how change detection works in Angular 5.0. Can some one help me to understand how the same works in React and how much it was different from Angular's ?

1

Solved

What is the best way to use OnPush change detection to make flexible in changing and also quite straightforward in testing? Going through various tutorials I have found to approach to use OnPush: ...
Lovesick asked 24/5, 2018 at 6:31

3

Solved

https://stackblitz.com/edit/angular-xpamld Question: Can someone help me understand why my prototype's changeDetection: ChangeDetectionStrategy.OnPush still allows me to update the inner value nam...
Formant asked 4/2, 2018 at 7:19

2

Solved

I have this pipe which multiplies the input value by an other value retrieved from a service: @Pipe({ name: 'multiply' }) export class MultiplyPipe implements PipeTransform { constructor(private...
Threnode asked 17/1, 2018 at 14:18

1

Solved

I have an HttpClient service which is updating the data at backend. During the processing at backend, I' am displaying a loading state by doing this.isLoading = true, and after the successfully pro...
Kiruna asked 29/9, 2017 at 18:24

4

Solved

I'm writing an Angular component that has a property Mode(): string. I would like to be able to set this property programmatically not in response to any event. The problem is that in the absence...
Rains asked 16/1, 2016 at 13:9

2

Solved

Angular 4. Github source I have a menu which is filled by a web service. The web service is in taskService, but is not necessary now. ngOnInit() { this.getTasks(); } getTasks(): void { this...
Habitue asked 20/12, 2017 at 19:31

3

This is a notorious error, which has a quite a "following" among developers, however it is also known to be quite tricky to debug. The log like this PersonalSituationComponent.html:3 ERROR Error: ...

2

Solved

Say, I have a component which is used as following: <health-renderer [health]="getHealth()" [label]="label"> <health-renderer> After reading data-binding related parts from https...
Goosander asked 14/10, 2017 at 22:23

1

Solved

I'm having a look to the example-app defined in the ngrx repo: https://github.com/ngrx/platform/tree/master/example-app I can see that the ChangeDetectionStrategy.OnPush property is set only on "c...
Scullery asked 28/9, 2017 at 12:44

1

Solved

Here's an example: @Component({ selector: 'my-app', template: ` <div> <h1>{{ foo }}</h1> <bpp [(foo)]="foo"></bpp> </div> `, }) export class App { foo;...
Androsterone asked 6/9, 2017 at 1:37

1

Solved

I have a child Calendar Component that receives events from his father through an input field. @Input() private events: any[]; When the month changes the parent gets new events from an API Servi...
Pouched asked 29/8, 2017 at 15:33

1

Solved

I don't understand why even if I use ChangeDetectionStrategy.OnPush and changeDetectorRef.detach() the function ngDoCheck keep been called. I have thousands of components in my app, and I'd like to...
Childers asked 10/8, 2017 at 13:59

1

Solved

Lets say i have a component structure like this: AppComponent HeaderComponent ContentComponent TodosComponent TodoComponent If I set HeaderComponent's changeDetection to ChangeDetectionStrat...
Hefty asked 5/8, 2017 at 11:53

© 2022 - 2024 — McMap. All rights reserved.