Error: Multiple instances of services

When you are working in Angular 2, you might got stuck in a situation where Angular 2 is creating multiple instances of your service. In Angular 2, Service are singleton object which can be used to fetch and push data from multiple components. First of all, try to understand that you only need to add your service once either in @NgModule or AppComponent(Top level component).

If you define your service in both of NgModule & AppComponent provider array than in that case 2 instances of that service will get created. Also Read: execute function inside template – Angular …

Continue Reading