@Component({
selector: 'app-overview-travel',
templateUrl: './overview-travel.component.html',
styleUrls: ['./overview-travel.component.scss'],
providers: [TravelService]
})
The code above prevented data from my shared data service (using Behaviour Subject from RXJS) from properly being shared.
@Component({
selector: 'app-overview-travel',
templateUrl: './overview-travel.component.html',
styleUrls: ['./overview-travel.component.scss']
})
However when i remove the providers: [TravelService]
the DataSharing Service works fine.. I'd love to know why?
Thanks in advance!