New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too hard to inherit from JwHttp #117
Comments
I found solution for my HttpService: import {Injector} from '@angular/core';
@Injectable()
export class HttpService extends JwtHttp {
constructor(
protected injector: Injector
) {
super(injector.get(Http), injector.get(SharedService), injector.get(ConfigService));
}
} So, breaking changes may will make in major release. But exports JwtRequestOptionsArgs are important now. |
Thanks, I've been pretty busy the past couple of months so I didn't have time to update this library. I'll do it next week. Probably sooner if you send a PR. |
I'm working on an angular 5 version of this library, this will remove JwtHttp and will replace it with an interceptor for the HttpClient |
What about export JwtRequestOptionsArgs? |
It will be removed entirely. the Http service is deprecated in Angular 5+ |
Yes, I understude but now in Angular 2 it very necessary. :) |
Sorry about that... |
Because you use injection in constructor's parameters it's very difficult to inherit the service.
Here: https://stackoverflow.com/a/39041953 is good explanation how to use Injector in constructor.
You'll get something like this:
Also need to export JwtRequestOptionsArgs from module.
The text was updated successfully, but these errors were encountered: