in Beta10,
I was working fine using
app.ts
to call provider service component like this:
import {GlobalService} from './providers/global-var';
and then in all other pages i can easily inherit, change and store the variables in GlobalService
.
in Beta11 however it throws me errors, forcing me to create independent GlobalService
instances making it impossible to share variables between components.
For example I created a model component in SomeService
, it throws me the error:
EXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in ./SomeService class SomeService_Host - inline template:0:0 ORIGINAL EXCEPTION: No provider for GlobalService!
It forces me to create a new instance to get rid of the error:
providers: [GlobalVar]
but that defeats the purpose of creating a global accessible service.
Am I doing it wrong? But it totally worked in Beta10