After having same issues as many people on StackOverflow i didn't manage to understand what is an "Outside angular zone" Service ?
I've checks all existing questions around this subject, and it's exactly why i needer to ask this one :
- https://github.com/angular/angular/issues/5150
- Angular2: view is not updated from inside a subscription
- https://blog.thoughtram.io/angular/2016/02/22/angular-2-change-detection-explained.html
- http://blog.assaf.co/angular-2-change-detection-zones-and-an-example/
Code Example in any component with default ChangeDetectionStrategy : (considering this.value referenced in view)
this.myService.method().subscribe(e => {
this.value = e;
});
Is the given service is not "Outside angular zone", the view is refreshed, on the other hand, if it's "Outside angular zone", the view is not refreshed, unless we call ChangeDetectorRef.detectChanges().
So the question is : what the condition to know if a service is Inside or Outside "Angular Zone" ?