I am trying to make a single instance of a service available to all components in my app but some pages aren't getting the same one and instead instantiating their own. The app is a tabbed app and I think it is the tabs.module of the individual tab.module that is the problem.
I import the service in the app.module.ts:
import { InitiativeService } from './services/initiative.service';
...
providers: [InitiativeService]
...
And import it in each page that needs it: import { InitiativeService } from './services/initiative.service';
constructor(private initServive: InitiativeService) {}
Which works for every page except the tabs. There is a tabs.module.ts and each individual tab has it's own .module.ts file. Importing the service in there isn't solving the issue. The tab instances are still newly created instances of the service only available to them and their children.
Any help on exactly to do with the tab modules would be appreciated.