From 203b2ba637af5129f3163fb746f5032e34eae8f6 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Sat, 13 Aug 2016 03:30:12 +0900 Subject: [PATCH] fix(http): expose jsonpFactory for AoT compilation (#10730) --- modules/@angular/http/http.ts | 5 ++++- tools/public_api_guard/http/index.d.ts | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/@angular/http/http.ts b/modules/@angular/http/http.ts index 85e23d47d3..5b185824c0 100644 --- a/modules/@angular/http/http.ts +++ b/modules/@angular/http/http.ts @@ -334,7 +334,10 @@ export const JSONP_PROVIDERS: any[] = [ {provide: JSONPBackend, useClass: JSONPBackend_}, ]; -function jsonpFactory(jsonpBackend: JSONPBackend, requestOptions: RequestOptions) { +/** + * @experimental + */ +export function jsonpFactory(jsonpBackend: JSONPBackend, requestOptions: RequestOptions): Jsonp { return new Jsonp(jsonpBackend, requestOptions); } diff --git a/tools/public_api_guard/http/index.d.ts b/tools/public_api_guard/http/index.d.ts index 542e3a22b8..e0b28dea96 100644 --- a/tools/public_api_guard/http/index.d.ts +++ b/tools/public_api_guard/http/index.d.ts @@ -108,6 +108,9 @@ export declare abstract class JSONPConnection implements Connection { abstract finished(data?: any): void; } +/** @experimental */ +export declare function jsonpFactory(jsonpBackend: JSONPBackend, requestOptions: RequestOptions): Jsonp; + /** @experimental */ export declare class JsonpModule { }