Hi,
this might be a simple question, however i didn’t found sth. about it in the topics, so:
My class looks like this
import { Module } from '../modules/abstract/module.abstract';
import { SomeModule1 } from '../modules/someModule1/someModule1.module';
import { SomeModule2 } from '../modules/someModule2/someModule2.module';
...
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen, public events: Events, private someModule1: SomeModule1, private someModule2: SomeModule2) {...}
...
this works like a charm.
Nevertheless it’d like to use it this way:
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen, public events: Events, private moduleArray: [someModule1: SomeModule1, someModule2: SomeModule2,]) {...}
but this gave me this error:
StaticInjectorError(AppModule)[MyApp -> Array]: StaticInjectorError(Platform: core)[MyApp -> Array]: NullInjectorError: No provider for Array!
is it possible to achieve what i want, without filling an array up in the constructor nor defining a class like ‘ModuleContainer’ which just preservs my modules? Do i have to play for this with this injector-thing?