Hi,
ive got a problem when injecting my service… it worked with the last beta (now i’m on 2.0.0-beta.32).
The error message is the following:
Unhandled Promise rejection: EXCEPTION: Error in :0:0 ORIGINAL EXCEPTION: No provider for FussballService! ORIGINAL STACKTRACE: Error: DI Exception at NoProviderError.BaseException [as constructor] (file:///android_asset/www/build/js/app.bundle.js:3015:23) at NoProviderError.AbstractProviderError [as constructor] (file:///android_asset/www/build/js/app.bundle.js:24318:16) at new NoProviderError (file:///android_asset/www/build/js/app.bundle.js:24354:16) at ReflectiveInjector_._throwOrNull (file:///android_asset/www/build/js/app.bundle.js:25337:19) at ReflectiveInjector_._getByKeyDefault (file:///android_asset/www/build/js/app.bundle.js:25365:25) at ReflectiveInjector_._getByKey (file:///android_asset/www/build/js/app.bundle.js:25328:25) at ReflectiveInjector_.get (file:///android_asset/www/build/js/app.bundle.js:25137:21) at ElementInjector.get (file:///android_asset/www/build/js/app.bundle.js:26719:48) at ElementInjector.get (file:///android_asset/www/build/js/app.bundle.js:26719:48) at ReflectiveInjector_._getByKeyDefault (file:///android_asset/www/build/js/app.bundle.js:25362:24)
I use the FussballService in my Fussball-View:
`@Page({
templateUrl: ‘build/pages/fussball/fussball.html’,
providers: [FussballService]
})
export class Fussball {
static get parameters() {
return [[NavController], [NavParams], [FussballService]];
}
constructor(nav, navParams, fussballService) {
this.fussball = fussballService;
}`
There it works fine, now i want to redirect to another page and use the same service again but without creating a new instance of FussballService:
`@Page({
templateUrl: ‘build/pages/fussball/spielplan/spielplan.html’
})
export class Spielplan {
static get parameters() {
return [[NavController], [FussballService]];
}
constructor(nav, fussballService) {
this.fussball = fussballService;
}`
Anybody know what i’m doing wrong?