You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[x] feature request
Current behavior
When used in inside a component with changeDetection: ChangeDetectionStrategy.OnPush loading bar does not work.
Reproduction of the problem
Place <ng2-slim-loading-bar></ng2-slim-loading-bar> inside a template of a component with changeDetection: ChangeDetectionStrategy.OnPush. Try start() - progress is updated, but component view is not reflecting that.
What is the expected behavior?
SlimLoadingBarComponent component should have changeDetection: ChangeDetectionStrategy.OnPush. It needs to inject private cd: ChangeDetectorRef and at the end of this.service.events.subscribe it should call this.cd.markForCheck();
What is the motivation / use case for changing the behavior?
This makes the component usable when changeDetection: ChangeDetectionStrategy.OnPush is used. Note that with redux/ngrx this change detection is very common.
Please tell us about your environment:
ng2-slim-loading-bar version: 4.0.0
Angular version: 4.0.1
Browser: all
Language: all
The text was updated successfully, but these errors were encountered:
I'm submitting a ...
Current behavior
When used in inside a component with
changeDetection: ChangeDetectionStrategy.OnPush
loading bar does not work.Reproduction of the problem
Place
<ng2-slim-loading-bar></ng2-slim-loading-bar>
inside a template of a component withchangeDetection: ChangeDetectionStrategy.OnPush
. Try start() - progress is updated, but component view is not reflecting that.What is the expected behavior?
SlimLoadingBarComponent component should have
changeDetection: ChangeDetectionStrategy.OnPush
. It needs to injectprivate cd: ChangeDetectorRef
and at the end ofthis.service.events.subscribe
it should callthis.cd.markForCheck();
What is the motivation / use case for changing the behavior?
This makes the component usable when
changeDetection: ChangeDetectionStrategy.OnPush
is used. Note that with redux/ngrx this change detection is very common.Please tell us about your environment:
ng2-slim-loading-bar version: 4.0.0
Angular version: 4.0.1
Browser: all
Language: all
The text was updated successfully, but these errors were encountered: