Sample hierarchy of my ionic 2 app..
few services which implements my baseService class to inject header and all that in each http requests.
Now I have a NativeStorage.get of user's info in constructor of the baseService in which I get user data already and update my local variable in that class only to be sent in HTTP requests.
But problem is each time I hit a new service it reinitialize my baseService again and so my user data gets empty and by the time NativeStorage.get starts its work http req is already gone with empty requests
base service
export class CommonRestProvider {}
a sample service
export class PlaceListService extends CommonRestProvider{ }
base service dependecies setting in app.module.ts
providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}, ConstantsService, CommonRestProvider]