What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bugfix for #32 .
Update to 2.0.5 introduced slimLoadingBarServiceFactory, which wasn't documented in README and caused errors in tests. In the commit message, there was written that it should fix AOT issue, but i'm not sure what the issue was in the first place.
This fix uses Subject instead of EventEmitter and it doesn't need to be provided in the constructor of the service (which was the main issue there).
I tried running ngc and it worked, so i assume there is no issue with AOT now.
Removes the need for the service factory
slimLoadingBarServiceFactory
, which wasn't documented in README and caused errors in tests. In the commit message, there was written that it should fix AOT issue, but i'm not sure what the issue was in the first place. This fix usesSubject
instead ofEventEmitter
and it doesn't need to be provided in the constructor of the service (which was the main issue there). I tried running ngc and it worked, so i assume there is no issue with AOT now.This method with
Subject
is documented also in the official Angular docs: https://angular.io/docs/ts/latest/cookbook/component-communication.html#!#bidirectional-serviceSomething on the topic
EventEmitter
vsSubject
: http://stackoverflow.com/questions/40238549/angular-2-event-emitters-vs-subject