Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Invalid provider error with CACHE_PRIMED_HTTP_PROVIDERS #252

Closed
andreymir opened this issue Aug 9, 2016 · 2 comments
Closed

Invalid provider error with CACHE_PRIMED_HTTP_PROVIDERS #252

andreymir opened this issue Aug 9, 2016 · 2 comments

Comments

@andreymir
Copy link

Trying to use PrimeCache helper and angular2-aspnet npm package. When I pass CACHE_PRIMED_HTTP_PROVIDERS into bootstrap function I get the following error:
Uncaught Invalid provider - only instances of Provider and Type are allowed, got: [object Object]
untitled

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Sep 7, 2016

The angular2-aspnet NPM module is seriously lagging behind at the moment - it still targets Angular 2 Beta 13 which is well out of date. Unfortunately Angular 2's APIs around DI and HTTP have changed a lot since then, so this particular functionality won't work until it's updated.

If you are keen to get this working and want to have a go at updating the angular2-aspnet sources for a current Angular 2 RC (at least RC4) then that would be great. We'd definitely accept a pull request for that!

If not, we might at some point update that module, but there's no ETA. It's a very low priority because virtually nobody needs to use it - almost all features in this repo are independent of that particular package. If we don't get chance to update that module soon, we might deprecate and remove it. Sorry for the inconvenience!

@SteveSandersonMS
Copy link
Member

As it stands, the CACHE_PRIMED_HTTP_PROVIDERS stuff will need to be discontinued as it's not compatible with anything but really old beta versions of Angular 2.

If there's demand for it, we can consider introducing a newer equivalent at some point. But right now it's not clear that many people feel the need for such functionality.

So, I'll close this and will remove the corresponding angular2-aspnet code from the source repo. This lets us focus more on the functionality that people really do want instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants