From c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 13 Jan 2017 12:16:00 +0100 Subject: Client: add basic aot support --- client/src/app/shared/auth/auth-http.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/auth/auth-http.service.ts b/client/src/app/shared/auth/auth-http.service.ts index 602726570..c4114aa02 100644 --- a/client/src/app/shared/auth/auth-http.service.ts +++ b/client/src/app/shared/auth/auth-http.service.ts @@ -80,12 +80,14 @@ export class AuthHttp extends Http { } } +export function useFactory(backend: XHRBackend, defaultOptions: RequestOptions, authService: AuthService) { + return new AuthHttp(backend, defaultOptions, authService); +} + export const AUTH_HTTP_PROVIDERS = [ { provide: AuthHttp, - useFactory: (backend: XHRBackend, defaultOptions: RequestOptions, authService: AuthService) => { - return new AuthHttp(backend, defaultOptions, authService); - }, + useFactory, deps: [ XHRBackend, RequestOptions, AuthService ] }, ]; -- cgit v1.2.3