Ever since ng2 beta 17 I get: Error:(62, 33) TS2339: Property 'resolveAndCreate' does not exist on type 'typeof Injector'.
var injector = Injector.resolveAndCreate(
[
TodoService,
TodoAction,
HTTP_PROVIDERS,
TodoStatsModel,
provide(CommBroker, {useClass: CommBroker}),
provide(AppStore, {useValue: this.appStore})
]);
I can't find an example of how to fix. Any help is appreciated
regadrs
Sean
found it:
var injector = ReflectiveInjector.resolveAndCreate(
[
TodoService,
TodoAction,
HTTP_PROVIDERS,
TodoStatsModel,
provide(CommBroker, {useClass: CommBroker}),
provide(AppStore, {useValue: this.appStore})
]);
this.service = injector.get(TodoService);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With