What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix #57
What is the current behavior? (You can also link to an open issue here)
When used in inside a component with changeDetection: ChangeDetectionStrategy.OnPush loading bar does not work.
What is the new behavior (if this is a feature change)?
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();
This makes the component usable when changeDetection: ChangeDetectionStrategy.OnPush is used. Note that with redux/ngrx this change detection is very common.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Bug fix #57
What is the current behavior? (You can also link to an open issue here) When used in inside a component with
changeDetection: ChangeDetectionStrategy.OnPush
loading bar does not work.What is the new behavior (if this is a feature change)? 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();
This makes the component usable whenchangeDetection: ChangeDetectionStrategy.OnPush
is used. Note that with redux/ngrx this change detection is very common.